gcs-resumable-upload
Advanced tools
Comparing version 0.3.0 to 0.4.0
12
index.js
@@ -41,2 +41,3 @@ 'use strict' | ||
this.metadata = cfg.metadata || {} | ||
this.origin = cfg.origin | ||
@@ -80,9 +81,8 @@ this.configStore = new ConfigStore('gcs-resumable-upload') | ||
}, | ||
json: metadata | ||
json: metadata, | ||
headers: {} | ||
} | ||
if (metadata.contentType) { | ||
reqOpts.headers = { | ||
'X-Upload-Content-Type': metadata.contentType | ||
} | ||
reqOpts.headers['X-Upload-Content-Type'] = metadata.contentType | ||
} | ||
@@ -94,2 +94,6 @@ | ||
if (this.origin) { | ||
reqOpts.headers.Origin = this.origin | ||
} | ||
this.makeRequest(reqOpts, function (err, resp) { | ||
@@ -96,0 +100,0 @@ if (err) return callback(err) |
{ | ||
"name": "gcs-resumable-upload", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"description": "Upload a file to Google Cloud Storage with built-in resumable behavior", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -104,2 +104,9 @@ # gcs-resumable-upload [![Build Status](https://travis-ci.org/stephenplusplus/gcs-resumable-upload.svg?branch=master)](https://travis-ci.org/stephenplusplus/gcs-resumable-upload) | ||
###### config.origin | ||
- Type: `string` | ||
- *Optional* | ||
Set an Origin header when creating the resumable upload URI. | ||
###### config.uri | ||
@@ -106,0 +113,0 @@ |
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
13395
249
165