How to get all posted files at once using fineUplo

2019-05-21 03:18发布

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条回答
Summer. ? 凉城
2楼-- · 2019-05-21 04:09

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.

查看更多
登录 后发表回答