How to use Fine Uploader js framework with ajax

2019-07-25 14:21发布

I want to use fineuploader JS library to use with upload multiple files. Now as per my requirement, user can select multiple files then those selected files should not be uploaded immediately instead of that user should above to review and modify them. once user is confirmed I want to get all the files list and then I need to process those files one by one by ajax JS function to send the files converted into base64 binary data to my server method.

I have seen fileuploader documents and I know my first two needs can be easily satisfied where user can select multiple files and modify them before uplaod to server, but am not sure how to use ajax JS function with uploaded files. I came across one option called uploadStoredFiles(), but again this will upload the files as per its default bahaviour, how can I get all files array and then process them as per my way.

1条回答
Rolldiameter
2楼-- · 2019-07-25 14:57

You can get a list of all submitted files using the getUploads() API method, and you can get the underlying Blob/File object for each submitted entry using the getFile() API method.

But keep in mind the status won't change, nor will anything else as far as fine uploader is concerned if you upload the files yourself. You'll have a UI filled with submitted files that never changes. Note that the only way to reflect the status of these files in the UI is to have fine uploader upload them.

查看更多
登录 后发表回答