Fine Uploader 3.2 has been released, and I have done my best to include a bunch of improvements, along with some new features. The two new major features are file chunking and auto-resume.
As always, please see the downloads page to download the library.
- #595 – inputName parameter is included in both the query string AND the request payload of XHR requests if forceMultipart is true (default) and paramsInBody is false (default). This will be fixed in 3.3. This will NOT affect most users. If it does negatively impact you, an easy workaround is to set the paramsInBody property of the request option to true. Note that in 3.3, the paramsInBody default value will be changed to true anyway. Please read more about this option in the options, and in the server-side readme.
- #584 – “Processing…” status message does not appear while waiting for response after sending last byte of last chunk to server. This only affects FineUploader mode. I plan to address this in 3.3. Not a major issue, but it deserves to be addressed. Please see the FAQ in the readme for more information about existing inconsistencies among browsers as far as this “Processing…” message is concerned.
Features & Enhancements
- #377 – Add support for optional file chunking. I have explained how this works, in detail, in a blog post.
- #530 – Allow users to resume failed/interrupted uploads from previous sessions. I have explained how this works, in detail, in a blog post.
- #575 – Add a qqtotalfilesize parameter to FormData multipart encoded requests so server-side code can easily determine the expected file size.
- #569 – Added an API function to retrieve File object given an ID.
- #566 – Add an API function that returns the size of a file, given the file’s ID.
- #546 – Version-stamp the CSS file contained in the released ZIP file.
- #541 – Allow developers to easily override the logic used to display the file name in FineUploader mode by contributing a formatFileName function option during initialization.
- #509 – Allow developers to change the endpoint at any time via a new setEndpoint function. The concept for this is the same as the setParams function.
- #111 – Ensure allowedExtensions validation check handles complex extensions, such as tar.gz, correctly.
- #63 – Allow developers to easily localize the size symbols (MB, GB, etc) via a new sizeSymbols option.
- #568 – onValidate is called too many times in browsers that do not support the File API. This fix also resulted in a breaking change to simplify the new “custom validators” feature. Please see the breaking changes section below for more details.
- #567 – FileData objects passed into the onValidate callback were sometimes File objects instead.
- #565 – “Upload Failed” message remains during manual retry attempt.
- #574 – onLeave message appears after canceling in-progress upload w/ autoUpload set to false.
- #562 – Processing graphic remains and dropping is no longer possible after attempting to drop multiple files w/ multiple option set to false. Thanks to twig for reporting this.
- #548 – default implementation of showMessage causes Safari to hang on IOS6. Thanks to turntreesolutions for reporting this.
I introduced a new callback: onValidateBatch that takes an array of FileData objects and is called once with all files selected. The onValidate callback will then always contain a FileData object and will be called for each of the files selected in the batch. This should simplify the new custom validation feature a bit. Please see the callback entries in the readme for more details.
Also, forceMultipart now defaults to “true”. This really should not be a breaking change, as your server-side code should already properly handle multipart encoded requests.
Note About The Codebase
I continue to refactor the codebase in order to make it more maintainable and more JSHint compliant. I recently switched from JSLint to JSHint, as I have found JSHint to be much more practical for real-world applications due to its flexibility.
Major Features Planned For 3.3?
- Copy and paste image upload. See #487 for more details.
- Provide an optional delete button next to each file item (in FineUploader mode) that will send a DELETE request to the server. I may provide an API function for FineUploaderBasic users as well. See #382 for more details.
Important note about 3.3
I plan to set change the default value of the
paramsInBody option to
true. I suspect that most developers expect parameters of multipart encoded requests to be located in the request body/payload. This should, over time, reduce some of the confusion I have seen in the support forums regarding request parameters.
If you have a question or a suggestion, please use the support forums or the issue tracker. Questions or issue reports will not be addressed in the comments section below.
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.