问题
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