Minor Changes
-
#2351
ee82380Thanks @enyo! -addedfilesnow reports the files found inside a dropped folder. It previously receivede.dataTransfer.files, which holds the folder entries rather than their contents, so anyone counting dropped files got the wrong answer for folders.This changes when the event fires. Reading a folder is asynchronous, so on browsers that support folder drops — all of them —
addedfilesis now emitted once the walk finishes, after the individualaddedfileevents, instead of synchronously at the end of the drop handler. Listeners still receive the event; only the timing moves.Also adds an
emptyfolderevent, emitted with the folder's path when a dropped folder turns out to contain nothing at all. -
#2348
f0697eeThanks @enyo! -parallelChunkUploads: truenow starts at mostparallelUploadschunks at a time rather than every chunk of the file at once. Pass a number to set a different limit, orInfinityto restore the previous behaviour. -
#2349
8a8b449Thanks @enyo! - AddresizeTransparencyFill, the color shown through transparent parts of a resized image. A transparent PNG resized toimage/jpegpreviously came out with black where it used to be see-through; set this to"#fff", or any CSS color, for a background instead. Defaults tonull, which keeps the current behavior.
Patch Changes
-
d3a9221Thanks @enyo! - Reword the defaultdictMaxFilesExceededmessage from "You can not upload any more files." to "You cannot upload any more files." -
#2350
9b5015bThanks @enyo! - Give the hidden file input anaria-label, so accessibility auditors stop reporting it as an unlabelled input. This does not change anything for screen reader users: browsers leavevisibility: hiddenelements out of the accessibility tree entirely, and the.dz-buttoncarryingdictDefaultMessageremains the control they interact with. -
#2352
b24f8ccThanks @enyo! - Associate the hidden file input with its form. The input is appended tohiddenInputContainer(the body by default), so it sits outside the form it belongs to and several dropzones on one page produce indistinguishable inputs. It now carries aformattribute when the dropzone is a form, or sits inside one, and that form has an id. The input has noname, so this does not change what a native submit sends — but it does mean the input now appears inform.elements. -
4e13aabThanks @enyo! - Vendorjust-extendinto the source and drop the dependency. Dropzone now installs with no dependencies at all; the option merging behaviour is unchanged.