Monthly Archives: November 2012

Upload folders via drag & drop in 3.1

The newest feature in Fine Uploader 3.1 includes the ability to upload folders via drag & drop.  This feature is only available in Chrome versions 21 and newer.  This is made possible by the File System API, which no other browser currently supports.

This API is still considered “experimental”, so it is conceivable that issues may arise in subsequent versions of Chrome, but I plan on following changes closely.  As other browsers implement the File System API, support for dropping folders will be added for those user agents as well.

There is really nothing you need to do to allow your users to upload dropped folders.  As long as they are running Chrome 21 or later, they can simply drop any folder they please.  Some very large folders, or remote folders behind high-latency connections may take a few seconds to process.  In this case a handy “processing” notice/graphic will appear until the files are ready to be submitted to the uploader.

Note that the uploader will process all files and directories under the dropped directory recursively.

I alo did some brief testing in Chrome Frame via IE7, but I am hesitant to claim support for Chrome Frame, so use at your own risk.

If you have any suggestions to improve this feature, please let me know by filing a feature or bug request.

-Ray Nicholus

Introducing Fine Uploader 3.0… and beyond!

Fine Uploader originally existed as file-uploader, and has also been known as valums/file-uploader (due to its location on Github).  Andrew Valums created file-uploader in 2010 as an improved version of “ajax-uploader”, also hosted on Github.  In August of 2012, Andrew handed the project over to me, and I have been maintaining and evolving this library since 2.0, when it was renamed Fine Uploader.

FU is a library useful for developers who want to tightly integrate the ability to upload files into their own web applications, regardless of the browser, without a required dependency on any third party libraries.  Fine Uploader does not use Flash or Java.  It’s pure javascript.  3.0 introduced, among other things, a jQuery plug-in that wraps the library, but this is a purely optional add-on.

FU gives developers quite a bit of flexibility.  It provides a pre-built UI, complete with progress bar, status messages, file information, drag & drop behaviors & cues, and a “select files” button, for developers that want to a turnkey solution with minimal adjustments.  This is the FineUploader section of the project.  Fine Uploader also provides an avenue for those who want a very specific look for their upload tool, and want to develop their own UI, but not worry about writing code to deal with client-side cross-browser upload processing.   This is the FineUploaderBasic portion of the project.  FineUploader inherits all behaviors and features from FineUploaderBasic, and provides a large amount of UI-based features as well.

Not sure how to write your server-side code to handle Fine Uploader’s requests?  It’s not hard!  Fine Uploader doesn’t really do anything out of the ordinary as far as constructing and sending requests is concerned.  FU makes use of HTML5 wherever possible such as the File API.  For browsers that do support the File API, FU streams selected files to the server.  For all other browsers, such as IE9 and older (along with Android 2.3.x and older), file data is sent in the body of a multipart encoded request, generated via by form submission.  All requests sent by Fine Uploader are POST requests.  A directory filled with server-side examples, covering many languages, exists in the server repo.

FU boasts a significant amount of features, with more planned in 3.1 and beyond.  The issue tracker in the Github project contains all planned features, scheduled through the 3.3 release.  If you are an existing Fine Uploader user, have a look at what’s new in 3.0 (quite a few things).  In case you aren’t already aware, support is available in the user forums.  I do my best to answer support and pull requests as quickly as possible (almost always the same day).

I am always open to suggestions regarding possible improvements or new features.  Feel free to open up a request in the issue tracker if you have something you’d like to see in FU.

Have a look at the home page to try out Fine Uploader for yourself!

-Ray Nicholus