瀏覽代碼

Fix S3 plugin for browsers without support to responseURL

Leonardo Schlossmacher 6 年之前
父節點
當前提交
65bb56e1e5
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      packages/@uppy/aws-s3/src/index.js

+ 5 - 0
packages/@uppy/aws-s3/src/index.js

@@ -175,6 +175,11 @@ module.exports = class AwsS3 extends Plugin {
             return { location: null }
             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
           // 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
           // parameters for a PUT request—doing a GET request with those will
           // always result in an error
           // always result in an error