Browse Source

Allow passing on XHRUpload options, such as "limit"

Onno Faber 7 years ago
parent
commit
8fb096a304
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/plugins/AwsS3/index.js

+ 2 - 2
src/plugins/AwsS3/index.js

@@ -114,7 +114,7 @@ module.exports = class AwsS3 extends Plugin {
   install () {
     this.uppy.addPreProcessor(this.prepareUpload)
 
-    this.uppy.use(XHRUpload, {
+    this.uppy.use(XHRUpload, Object.assign({
       fieldName: 'file',
       responseUrlFieldName: 'location',
       getResponseData (xhr) {
@@ -142,7 +142,7 @@ module.exports = class AwsS3 extends Plugin {
         const error = xhr.responseXML.querySelector('Error > Message')
         return new Error(error.textContent)
       }
-    })
+    }, this.opts.xhrOptions || {}))
   }
 
   uninstall () {