1

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.

Ray Nicholus
  • 19,538
  • 14
  • 59
  • 82
user2809299
  • 149
  • 2
  • 13
  • You want to use Fine Uploader, but you want to upload the files yourself, using your own ajax code? – Ray Nicholus Jan 12 '17 at 06:08
  • Yes exactly, I want to use FineUploader for its UI componenets, drag and drop support along with many other great feature like modification, validation all those things. – user2809299 Jan 12 '17 at 06:29
  • Well... you can get a list of all submitted files using the [`getUploads()` API method](http://docs.fineuploader.com/branch/master/api/methods.html#getUploads), and you can get the underlying `Blob`/`File` object for each submitted entry using the [`getFile` API method](http://docs.fineuploader.com/branch/master/api/methods.html#getFile). – Ray Nicholus Jan 12 '17 at 06:42
  • Thank you so much Ray, just one doubt, I checked `getUplaods()` API and it contains some of the properties like status is one, So the object which is returned by this API contains information regarding the file attachment on client side or uploading of files at the server? because in my case I'm not providing any endpoint, so in that case will all files status became **Failed**? – user2809299 Jan 12 '17 at 06:56
  • 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 uploaded them. – Ray Nicholus Jan 12 '17 at 12:52

1 Answers1

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.

Ray Nicholus
  • 19,538
  • 14
  • 59
  • 82
  • Thank You Ray, your provided solution answered for the question, well In my case there was many other custom things involved like reading of type of extension and building the icon automatically, so I switched to an another library, but certainly if anyone else have the same question this will help them. That's why I'm accepting this answer. – user2809299 Jan 15 '17 at 04:52
  • You can do all of this with Fine Uploader, pretty easily in fact. The library is designed to support highly customized workflows. – Ray Nicholus Jan 15 '17 at 05:16
  • Sure Ray, I'll give it a try. Actually I'm having some difficulty with the documentation and that's one of the reason I was not able to build my customized version. I know that it is one of the best and highly configurable framework. – user2809299 Jan 16 '17 at 04:05
  • One of the major thing which i noticed is the examples, documentation having less examples regarding the options and methods. Like In my case I want to create a customized File uploader, where File selection, file modification and file thumbnails view should be handled by framework, but I can configure that like in thumbnails if it is any image we can show it directly if it any other type it should add that file type icon on the thumbnails. Similarly I have my own uploading logic which should easily integrate with progress section to show each file current status. – user2809299 Jan 16 '17 at 06:35
  • There are many examples but most of them are not on the customized side, all of them targeting that to upload file use `uploadStoredFiles()`, but how should I use it with my custom uploader. and how's I can configure the other UI related configuration. – user2809299 Jan 16 '17 at 06:37
  • I know its open source and that's why I am not expecting anything here, Its my pleasure If I can contribute something over there. I'll try at my end, How much I learned and what I built from a customized version I'll document that in detail. So it will help others to use it. – user2809299 Jan 16 '17 at 06:38