Patch Changes
- 0c16fe4: - Make
file.data
nullable - Because for ghosts it will beundefined
and we don't have any type to distinguish ghosts from other (local) files. This caused a crash, because we didn't check forundefined
everywhere (when trying to store a blob that wasundefined
)- Introduce new field
progress
.complete
: if there is a post-processing step, set it totrue
once post processing is complete. If not, set it totrue
once upload has finished. - Throw a proper
Nonexistent upload
error message if trying to upload a non-existent upload, instead of TypeError - Rewrite
Uppy.upload()
- this fixes two bugs:- No more duplicate emit call when this.#restricter.validateMinNumberOfFiles throws (
#informAndEmit
andthis.emit('error')
) - 'restriction-failed' now also gets correctly called when
checkRequiredMetaFields
check errors.
- No more duplicate emit call when this.#restricter.validateMinNumberOfFiles throws (
- Don't re-upload completed files #5930
- Split UppyFile into two intefaces distinguished by the
isRemote
boolean:- LocalUppyFile
- RemoteUppyFile
- Remove TagFile type - Use UppyFile instead.
- Make
name
required on UppyFile (it is in reality always set) - Fix bug:
RestrictionError
sometimes thrown with afile
property that was not aUppyFile
, but aFile
. This would happen if someone passed aFile
instead of aMinimalRequiredUppyFile
intocore.addFile
(which is valid to do according to our API) - Improve some log messages
- Simplify Uppy
postprocess-complete
handler
- Introduce new field