From 65bb56e1e5dbcd9b40a5e4095ee22af5355efeeb Mon Sep 17 00:00:00 2001 From: Leonardo Schlossmacher Date: Sat, 7 Jul 2018 18:42:43 +0200 Subject: [PATCH] Fix S3 plugin for browsers without support to responseURL --- packages/@uppy/aws-s3/src/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/@uppy/aws-s3/src/index.js b/packages/@uppy/aws-s3/src/index.js index 7cae635a7..fd807f9db 100644 --- a/packages/@uppy/aws-s3/src/index.js +++ b/packages/@uppy/aws-s3/src/index.js @@ -175,6 +175,11 @@ module.exports = class AwsS3 extends Plugin { return { location: null } } + // responseURL is not available in older browsers. + if (!xhr.responseURL) { + return { location: null } + } + // Trim the query string because it's going to be a bunch of presign // parameters for a PUT request—doing a GET request with those will // always result in an error