I want to upload two image files in a single request with the following request body :
(我想使用以下请求正文在一个请求中上传两个图像文件:)
Form Data
signatureFile:(binary)
profileFile:(binary)
I have two separate dropzone elements as below:
(我有两个单独的dropzone元素,如下所示:)
<div class="userDetails">
<form action="user/upload" class="dropzone" id="profileImg">
</form>
<form action="user/upload" class="dropzone" id="signatureImg">
</form>
<button (click)="upload()">Upload Profile and Signature</button>
</div>
here is my angular code :
(这是我的角度代码:)
upload() {
Dropzone.options.profileImg = {
paramName:"profileFile",
uploadMultiple: true,
autoProcessQueue: false,
maxFiles: 2,
parallelUploads: 2,
};
Dropzone.options.signatureImg = {
paramName:"signatureFile",
uploadMultiple: true,
autoProcessQueue: false,
maxFiles: 2,
parallelUploads: 2,
};
Dropzone.instances[0].processQueue();
Dropzone.instances[1].processQueue();
}
But my problem is it will only send the first parameter signatureFile not sending the profileFile parameter, see the request body
(但是我的问题是它只会发送第一个参数signatureFile而不发送profileFile参数,请参见请求正文)
Form Data
signatureFile: (binary)
any idea what I missed, I tried so many examples from the stackOverflow and the Dropzone official website but I didn't found any useful solution for this scenario.
(任何想法,我错过了,我都尝试了stackOverflow和Dropzone官方网站上的很多示例,但是我没有找到任何适用于这种情况的解决方案。)
ask by Mussammil translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…