How to use Fine Uploader js framework with ajax

喜欢而已 提交于 2019-12-24 07:59:04

问题


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:


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.



来源:https://stackoverflow.com/questions/41606156/how-to-use-fine-uploader-js-framework-with-ajax

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