Browse Source

companion: bypass upload destination validation for s3

Ifedapo Olarewaju 6 years ago
parent
commit
df9875911a
1 changed files with 7 additions and 0 deletions
  1. 7 0
      packages/@uppy/companion/src/server/Uploader.js

+ 7 - 0
packages/@uppy/companion/src/server/Uploader.js

@@ -52,6 +52,13 @@ class Uploader {
    * @returns {boolean}
    */
   validateOptions (options) {
+    // s3 uploads don't require upload destination
+    // validation, because the destination is determined
+    // by the server's s3 config
+    if (options.protocol === 's3-multipart') {
+      return true
+    }
+
     if (!options.endpoint && !options.uploadUrl) {
       this._errRespMessage = 'No destination specified'
       return false