如何使用Multer上传嵌套文件?
我想知道,当所需的请求主体如下嵌套时,使用Multipart/form-data上传多个图像的方式。目前,我尝试使用 multer 使用单键值对上传图像,而且工作正常。但是,我是否可以将文件上传到file_path属性并将其发送到后端。
{
"Name": "",
"Description": "",
"Images": [{
"field_name": "Field 1",
"input": [{
"type": "image",
"file_path": "Uploading File"
}]
}
}
I want to know the way of uploading multiple images using multipart/form-data when the required request body is nested as below. Currently I tried uploading images using multer with single key value pair and it's working fine. But, is there any alternative through which I can upload file to file_path property and send it to the backend.
{
"Name": "",
"Description": "",
"Images": [{
"field_name": "Field 1",
"input": [{
"type": "image",
"file_path": "Uploading File"
}]
}
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论