소스 검색

Merge pull request #471 from ogtfaber/master

Allow passing on XHRUpload options, such as "limit" to AwsS3 Plugin
Renée Kooi 7 년 전
부모
커밋
8235ae06bc
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      src/plugins/AwsS3/index.js

+ 4 - 0
src/plugins/AwsS3/index.js

@@ -16,6 +16,8 @@ module.exports = class AwsS3 extends Plugin {
     }
 
     const defaultOptions = {
+      timeout: 30 * 1000,
+      limit: 0,
       getUploadParameters: this.getUploadParameters.bind(this),
       locale: defaultLocale
     }
@@ -117,6 +119,8 @@ module.exports = class AwsS3 extends Plugin {
     this.uppy.use(XHRUpload, {
       fieldName: 'file',
       responseUrlFieldName: 'location',
+      timeout: this.opts.timeout,
+      limit: this.opts.limit,
       getResponseData (xhr) {
         // If no response, we've hopefully done a PUT request to the file
         // in the bucket on its full URL.