Skip to content

Commit

Permalink
Add error message
Browse files Browse the repository at this point in the history
  • Loading branch information
dschmidt committed Jan 8, 2025
1 parent 26471e1 commit 04effbe
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/@uppy/companion/src/server/Uploader.js
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,9 @@ class Uploader {
if (this.options.companionOptions.tusDeferredUploadLength && !isFileStream) {
tusOptions.uploadLengthDeferred = true
} else {
if (!this.size) {
reject(new Error('tusDeferredUploadLength needs to be enabled if no file size is provided by the provider'))
}
tusOptions.uploadLengthDeferred = false
tusOptions.uploadSize = this.size
}
Expand Down

0 comments on commit 04effbe

Please sign in to comment.