0

有人可以给我一个名为“Multimedia.json”的模型示例,我可以使用它来存储上传的多媒体文件(音频、视频或 jpg)吗?具体来说,有没有一种叫做“多媒体”或“二进制”的类型?Strongloop方式的任何策略?谢谢,

{
  "name": "Multimedia",
  "base": "PersistedModel",
  "idInjection": true,
  "options": {
    "validateUpsert": true
  },
  "properties": {
    "title": {
      "type": "string",
      "required":true
    },
    "description": {
      "type": "string"
    },
    "category": {
      "type": "string"  ---can this be a type called binary?
    }
  },
  "validations": [],
  "relations": {
    "report": {
      "type": "belongsTo",
      "model": "Report",
      "foreignKey": ""
    }
  },
  "acls": [],
  "methods": []
}
4

1 回答 1

0

没有内置的方法可以做到这一点,但 StrongLoop 自己在他们的文档中参考了这篇文章,以了解当前使用存储组件存储元数据的最佳方法。

https://stackoverflow.com/a/31118294/1753891 https://docs.strongloop.com/display/public/LB/Storage+component

于 2015-08-20T07:50:42.310 回答