How to get all posted files at once using fineUploader?

纵饮孤独 提交于 2019-12-22 18:50:32

问题


I have a fineuploader that allows multiple files to be uploaded in MVC web app.

Example: Suppose I upload 3 files 5MB, 20MB, 1MB

I expect 3 files to arrive in the controller in single call but they are not. I want to iterate all 3 files (array) and process

Question 1: Is there a way to get all 3 files at once in the server?

[HttpPost]
public FineUploaderResult UploadFile(FineUpload upload)
{
   //upload contains only one file at a time
   //for second file it gets call again even though I submit only once
}

回答1:


No. Fine Uploader sends each file in a separate request. This is not currently configurable. If you need to tie your files together, you can easily do that by passing common parameters with each file via the params option, or the setParams API method. Sever-side, you can look for this common parameter in each upload POST request and deal with the files accordingly.



来源:https://stackoverflow.com/questions/21056720/how-to-get-all-posted-files-at-once-using-fineuploader

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!