Use standard upstream dropzone.js instead of custom dropzone

Description

We're currently using a modified version of dropzone.js (see SAK-25455).

It would be preferred to move to a centrally-maintained (reference/library/src/webapp/js) dropzone.js and modifications to the library would happen in a separate file.

Environment

None

Test Plan

None

Attachments

1

Activity

Show:

Earle Nietzel April 4, 2014 at 10:55 AM

For the alert about whether or not folder upload is supported it makes sense to externalize that and detect it ahead of time i.e. with modernizr.

We could probably do something special when a folder has been added via one of the listeners, i.e. as in the alert above.

Earle Nietzel April 4, 2014 at 10:48 AM

FYI I did get a dropzone dev environment setup and realized that the queue modification broke about 10 unit tests, this is when I reevaluated the patch and understood what processQueue was doing and reimplemented it with the the help of their listeners. Basically processQueue starts the processing and with parallel processing set to 1 after each file completes and if there are more process the next one until a there are no more files and a queuecomplete event is emitted.

Daniel Merino April 2, 2014 at 3:52 AM

FYI I have suggested something similar in https://github.com/enyo/dropzone/issues/528

Sam Ottenhoff March 31, 2014 at 9:43 AM

> The only thing I miss from my previous changes is an alert that I programmed when a folder is dropped in a non-compatible browser.

My suggestion would be to submit this as an upstream pull-request or an upstream issue to the Dropzone.js:

https://github.com/enyo/dropzone/issues

Daniel Merino March 31, 2014 at 5:16 AM

Thank you so much for this change! This is much better than before and updating dropzone to 3.8.4 fixes some issues I had to manage by my own.

The only thing I miss from my previous changes is an alert that I programmed when a folder is dropped in a non-compatible browser. When adding a file, if a folder is dropped and the browser does not support it, all these three conditions happens:

if ((!file.size) && (!file.type) && (!file.fullPath))
{
alert("Folder upload is not supported by your current browser. Currently, only Chrome 21 or upper allows it.");
}

This worked in the three major browsers I tested it (Firefox, Chrome and Internet Explorer). Currently this change is not in the code and a folder dropped in the dropzone fails silently. Don't you think that an alert for users would be useful here?

Fixed

Details

Assignee

Reporter

Fix versions

Affects versions

Priority

Created March 26, 2014 at 2:16 PM
Updated September 4, 2014 at 7:38 AM
Resolved March 28, 2014 at 12:37 PM