|
@@ -171,7 +171,7 @@ module.exports = class AwsS3 extends Plugin {
|
|
|
this.uppy.addPreProcessor(this.prepareUpload)
|
|
|
|
|
|
let warnedSuccessActionStatus = false
|
|
|
- this.uppy.use(XHRUpload, {
|
|
|
+ let xhrUploadOpts = {
|
|
|
fieldName: 'file',
|
|
|
responseUrlFieldName: 'location',
|
|
|
timeout: this.opts.timeout,
|
|
@@ -227,7 +227,14 @@ module.exports = class AwsS3 extends Plugin {
|
|
|
const error = getXmlValue(content, 'Message')
|
|
|
return new Error(error)
|
|
|
}
|
|
|
- })
|
|
|
+ }
|
|
|
+
|
|
|
+ // Replace getResponseData() with overwritten version.
|
|
|
+ if (this.opts.getResponseData) {
|
|
|
+ xhrUploadOpts.getResponseData = this.opts.getResponseData
|
|
|
+ }
|
|
|
+
|
|
|
+ this.uppy.use(XHRUpload, xhrUploadOpts)
|
|
|
}
|
|
|
|
|
|
uninstall () {
|