diff --git a/libs/upload.js b/libs/upload.js index 7623117..1be709d 100644 --- a/libs/upload.js +++ b/libs/upload.js @@ -1,7 +1,8 @@ var path = require('path'); -var gcloud = require('gcloud'); +var gcloud = require('google-cloud'); var Promise = require('ember-cli/lib/ext/promise'); + module.exports = function uploadToGCS(plugin, config) { var cloud = gcloud(config.gcloud); var gcs = cloud.storage(); @@ -13,9 +14,10 @@ module.exports = function uploadToGCS(plugin, config) { return new Promise(function (resolve, reject) { var destinationFilePath = config.bucketFolder ? path.join(config.bucketFolder, filePath) : filePath; - + var metadata = isGzipped ? {contentEncoding:"gzip"} : {} return bucket.upload(basePath, { destination: destinationFilePath, + metadata:metadata, gzip: !isGzipped }, function (err, file) { if (err) { diff --git a/package.json b/package.json index a7c54d9..08525e6 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "dependencies": { "ember-cli-babel": "^5.1.6", "ember-cli-deploy-plugin": "^0.2.6", - "gcloud": "^0.30.3", + "google-cloud": "^0.38.3", "minimatch": "^3.0.2" }, "ember-addon": {