Repository navigation
Releases
dropzone@6.3.5
Patch Changes
-
#2380
88901b7- FixbinaryBodyuploads sending the original file instead of the transformed one.resizeWidth,resizeHeightand any customtransformFilewere silently ignored, so an unresized image went to the server. Chunked and form-data uploads were unaffected. -
#2379
eae9121- Fix cancelling an upload whiletransformFileis still running. The file had noxhryet, so it was grouped with every other file that had not started and the whole queue was cancelled with it — and the file itself was still sent once the transform finished.
dropzone@6.3.4
Patch Changes
-
#2377
0b302ee- Stopdestroy()removing a different instance.Dropzone.instances.splice(indexOf(this), 1)dropped the last entry wheneverindexOfreturned -1 — callingdestroy()twice was enough — evicting an unrelated live Dropzone from the registry. -
#2377
dc5d7bf- Setenctype="multipart/form-data"on a form again.init()comparedtagNameagainst lower-case"form", which never matches, so the attribute was never set. Only affects forms that are also submitted natively; the XHR upload is unchanged.
dropzone@6.3.3
Patch Changes
-
#2375
6a03691- Fix the declared type ofclickableandhiddenInputContainer.Both options are derived from their default values, so
clickable: truewas inferred asbooleanandhiddenInputContainer: "body"asstring. That contradicted what each one documents and what both have always accepted at runtime, and TypeScript rejected the documented forms.clickableis nowboolean | string | HTMLElement | (string | HTMLElement)[]andhiddenInputContainerisstring | HTMLElement. Nothing changes at runtime.
dropzone@6.3.2
Patch Changes
-
#2371
536d94a- FixcancelUploadleaving parallel chunks uploading.file.xhronly holds the request that started last, so cancelling a chunked upload running withparallelChunkUploadsaborted that one request and left every other in-flight chunk streaming to the server — burning the user's bandwidth and writing orphaned chunks for a file the UI already showed as canceled.Every chunk keeps its own request, so
cancelUploadnow aborts all of the ones still running. Uploads that are not chunked are unaffected. -
#2372
a1a67df- Fixemitskipping a listener when another one removes itself.emitwalked the live callback array, so a listener that calledofffor itself — the usual shape of a one-shot listener, and of teardown code — spliced the array out from under the loop and the listener registered right after it never ran.emitnow iterates over a snapshot.One consequence worth knowing about: a listener registered from inside another listener no longer runs during that same
emit, it runs from the next one. That is what Node'sEventEmitterdoes, and it is the only way to keep the removal case correct. -
#2370
0e3625d- Fix the thumbnail queue deadlocking when a file cannot be read.createThumbnailonly listened forFileReader'sloadevent. A file that had been moved, locked by another process, or was otherwise unreadable since it was dropped fireserrorinstead, so the callback was never invoked and_processThumbnailQueuekept its lock forever: no file added afterwards got a thumbnail, and withresizeWidth/resizeHeightor atransformFilethat usescreateThumbnail, the upload never started either.The read error now reaches the callback the same way an undecodable image already did, so the file gets
dictThumbnailErrorand the queue moves on.DropzoneThumbnailCallbacksays what it has always done, too: its first argument isstring | Event, the error event standing in for the data URL when no thumbnail could be produced. That also fixesdisplayExistingFile, which used to emit that event as a thumbnail when the image URL failed to load, leaving the preview withimg.srcset to"[object Event]".
dropzone@6.3.1
Patch Changes
-
#2362
07d3876- Drop thesassdependency. The stylesheets are plain CSS now, anddist/dropzone.cssanddist/basic.cssare unchanged in what they do: the output was compared declaration by declaration, and every difference is a value-level equivalence the minifier applies, such aspadding: 20px 20pxcollapsing topadding: 20px.This only affects you if you were importing
dropzone/src/dropzone.scssdirectly rather than the built CSS. Importdropzone/src/dropzone.cssinstead, or the compileddropzone/dist/dropzone.css.
dropzone@6.3.0
Minor Changes
-
#2361
4724f39- Ship TypeScript types. The library is now written in TypeScript and the package carries its own declarations, sodropzoneis typed from its own source.If you installed
@types/dropzone, uninstall it: it is stuck at5.7.9and describes the v5 API, so it will now conflict with — and is less accurate than — the types shipped here.Dropzone.prototype.Emitteris nowDropzone.Emitter. It was undocumented and described in the source as being exposed for tests, so this is unlikely to affect you; if you reached for it, the class is in the same place under the shorter name.
Patch Changes
- #2361
4724f39- Give each dropzone its own thumbnail queue. It lived on the prototype, so every dropzone on a page shared one: queuing a thumbnail on one was visible from the others, and they rendered from a single queue guarded by a single lock. Only pages with more than one dropzone were affected.
dropzone@6.2.1
Patch Changes
-
#2355
07a1347Thanks @enyo! - Pointhomepageathttps://www.dropzone.dev/. It referenced/js, a route that only ever redirected to the front page and no longer exists, so the homepage link on npm was a 404. -
#2353
bb5af51Thanks @enyo! -CODE_OF_CONDUCT.mdis no longer part of the published package. It stays in the repository where GitHub looks for it, but the library now lives inpackages/dropzoneand npm can only pack files from inside that directory. Nothing else about the package changed.
v6.2.0
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.
v6.1.0
Minor Changes
b32d746Thanks @filip-kinsky! - Emit anerrorinstead of a broken thumbnail when a file claims an image type but cannot be decoded. The newdictThumbnailErroroption holds the message.
Patch Changes
-
94a0656Thanks @AJHoeh! - CoercechunkSizeto a number before computing chunk boundaries. When the option arrived as a string, every chunk after the first was sliced from the wrong offset and the uploaded file was silently corrupted. -
85c5c2aThanks @enyo! - Stop preview thumbnails from being dragged back into the dropzone, which added the same file a second time under a generated name. -
4762df8Thanks @Forceu! - Send a single chunk for zero byte files instead of hanging. WithforceChunkingenabled, an empty file produced a chunk count of zero, so nothing was ever uploaded.
Release v6.0.0
The 6.0.0 line is now stable. There are no API changes since 6.0.0-beta.2 — see the changelog for the breaking changes introduced in this major version.
@swc/helpersis no longer a dependency.just-extendis now the only one.- The bundles are considerably smaller, since they are no longer transpiled for browsers that 6.0.0 had already stopped supporting.