有人能给我一个名为“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": []
}
答案 0 :(得分:0)
没有内置方法可以做到这一点,但StrongLoop本身在他们的文档中引用了这篇文章,以了解当前存储组件存储元数据的最佳方法。
https://stackoverflow.com/a/31118294/1753891 https://docs.strongloop.com/display/public/LB/Storage+component