gcs-resumable-upload
Advanced tools
Comparing version 2.2.5 to 2.3.0
@@ -28,2 +28,14 @@ /*! | ||
} | ||
export declare type PredefinedAcl = 'authenticatedRead' | 'bucketOwnerFullControl' | 'bucketOwnerRead' | 'private' | 'projectPrivate' | 'publicRead'; | ||
export interface QueryParameters { | ||
contentEncoding?: string; | ||
ifGenerationMatch?: number; | ||
ifGenerationNotMatch?: number; | ||
ifMetagenerationMatch?: number; | ||
ifMetagenerationNotMatch?: number; | ||
kmsKeyName?: string; | ||
predefinedAcl?: PredefinedAcl; | ||
projection?: 'full' | 'noAcl'; | ||
userProject?: string; | ||
} | ||
export interface UploadConfig { | ||
@@ -89,5 +101,10 @@ /** | ||
/** | ||
* Specify query parameters that go along with the initial upload request. See | ||
* https://cloud.google.com/storage/docs/json_api/v1/objects/insert#parameters | ||
*/ | ||
params?: QueryParameters; | ||
/** | ||
* Apply a predefined set of access controls to the created file. | ||
*/ | ||
predefinedAcl?: 'authenticatedRead' | 'bucketOwnerFullControl' | 'bucketOwnerRead' | 'private' | 'projectPrivate' | 'publicRead'; | ||
predefinedAcl?: PredefinedAcl; | ||
/** | ||
@@ -140,3 +157,4 @@ * Make the uploaded file private. (Alias for config.predefinedAcl = | ||
origin?: string; | ||
predefinedAcl?: 'authenticatedRead' | 'bucketOwnerFullControl' | 'bucketOwnerRead' | 'private' | 'projectPrivate' | 'publicRead'; | ||
params: QueryParameters; | ||
predefinedAcl?: PredefinedAcl; | ||
private?: boolean; | ||
@@ -143,0 +161,0 @@ public?: boolean; |
@@ -56,2 +56,3 @@ "use strict"; | ||
this.origin = cfg.origin; | ||
this.params = cfg.params || {}; | ||
this.userProject = cfg.userProject; | ||
@@ -117,3 +118,6 @@ if (cfg.key) { | ||
url: [this.baseURI, this.bucket, 'o'].join('/'), | ||
params: { name: this.file, uploadType: 'resumable' }, | ||
params: Object.assign({ | ||
name: this.file, | ||
uploadType: 'resumable', | ||
}, this.params), | ||
data: metadata, | ||
@@ -120,0 +124,0 @@ headers: {}, |
@@ -7,2 +7,9 @@ # Changelog | ||
## [2.3.0](https://www.github.com/googleapis/gcs-resumable-upload/compare/v2.2.5...v2.3.0) (2019-10-09) | ||
### Features | ||
* support all query parameters during URI creation ([#275](https://www.github.com/googleapis/gcs-resumable-upload/issues/275)) ([383a490](https://www.github.com/googleapis/gcs-resumable-upload/commit/383a490)) | ||
### [2.2.5](https://www.github.com/googleapis/gcs-resumable-upload/compare/v2.2.4...v2.2.5) (2019-09-07) | ||
@@ -9,0 +16,0 @@ |
{ | ||
"name": "gcs-resumable-upload", | ||
"version": "2.2.5", | ||
"version": "2.3.0", | ||
"description": "Upload a file to Google Cloud Storage with built-in resumable behavior", | ||
@@ -5,0 +5,0 @@ "repository": "googleapis/gcs-resumable-upload", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
59196
640