Fine Uploader 3.1

Fine Uploader 3.1 has been released, and I have done my best to include a bunch of improvements, along with some new features.

As always, please see the downloads page to download the library.

Known Issues

  • #539 – Uploads broken in Android 2.3 and older. This is fixed in the 3.1.1 hotfix release.

Features & Enhancements

  • #518 – Allow parameters to be specified for a specific file, and at any time during the upload process. This affects the setParams function. I have explained how this works, in detail, in a blog post.
  • #510 – Allow additional input elements and File objects to be passed into the uploader (for uploading) via a new public function.
  • #482 – Specify custom hover & focus classes for upload button. Thanks to obiwanus for this contribution.
  • #380 – Support uploading folders via drag & drop. Please read my blog post on this feature before asking any questions.
  • #113 – Allow parameters to be passed in request body only (via a new option). Please read my blog post on this feature.

Bugs Fixed

  • #511 – Multipart encoded requests include redundant filename parameter, in query string. Thanks to AnilRh for reporting this.
  • #498 – jQuery object parameters passed to functions are not transformed to HTMLElements
  • #493 – After resetting uploader, event handlers are added again, but not removed. This results in redundant event handlers attached to elements in some cases.
  • #492 – jQuery selectors are not obeyed when binding plug-in instance. Only the first matched element is used. Thanks to akre54 for reporting this.
  • #474 – Caught callback error message sometimes lists the wrong callback as the source of the failure.
  • #220 – Dragging an IMG element or text node enables drop area. Thanks to donaldallen for reporting this.
  • untracked – Public cancel function in FineUploader does not remove the associated file element in the UI.

Breaking Changes

The template option has changed. I needed to add some elements to display the status of the uploader when processing large dropped directories or dropped directories behind high-latency connections. Please have a look at the current template option default value and modify your code accordingly if you have contributed a modified template option. UPDATE: Templating changed drastically in Fine Uploader 4.0. If you are using 4.0, please see the styling documentation page for details.

Note About The Codebase

There were also many changes made to the code that are not visible in the features and bugfixes listed above. I am continuing to work on making the Fine Uploader codebase JSLint-compliant. Also, as I do this, I’m also attempting to modify the code so a common code style is used throughout the project. This should make life easier for me and forkers. I’m also slowly building up the qQuery section of the uploader with common and useful functions.

Just a reminder – do not make use of any variables or functions that start with an underscore. Those are private, by convention, and may change or disappear at any time. One of my goals is to eventually eliminate this convention in favor of proper information hiding. In 3.1, I split all of the drag and drop code into a new file, ensured it was JSLint-compliant, and removed all of the underscored variables and functions by making use of the module pattern.

What’s In Store For 3.2?

The big feature in 3.2 will be file chunking, which I aim to make fully configurable. This will certainly complement the auto/manual failed upload retry feature. In other words, if a large file fails somewhere near the end of the file, Fine Uploader can simply retry starting with the last failed chunk, instead of re-sending the entire file again. File chunking will be an advanced feature for advanced developers/users of the library, as it will require a good understanding of the process in order to properly code your server-side handler.

The file chunking feature will also allow me to provide a “resume upload” feature. This will allow your users, if enabled, to resume a paused or failed upload from a previous session. Let’s say a user is uploading a very large file from their laptop at a coffee shop, and, for whatever reason, they have to leave before the upload has completed. This feature will allow them to resume the upload on their laptop when they get home, simply by attempting to upload the file again (via drop or “select files” dialog). I haven’t worked out any of the details yet, so the specifics surrounding the resume may change, but this is the general idea, at this point.

You can follow progress of file chunking and upload resume in the issue tracker.

As always, please let me know (in the forums or the issue tracker) if you have any suggestions for improvement, or any killer features you’d like me to add.

-Ray Nicholus