multer-gcloud
Advanced tools
Comparing version 0.1.0 to 0.1.1
10
index.js
@@ -30,3 +30,4 @@ const stream = require('stream') | ||
storage.getDestination.bind(storage, req, file), | ||
storage.getFilename.bind(storage, req, file) | ||
storage.getFilename.bind(storage, req, file), | ||
storage.getStorageBucket.bind(storage, req, file) | ||
], function (err, values) { | ||
@@ -37,3 +38,4 @@ if (err) return cb(err) | ||
destination: values[0], | ||
filename: values[1] | ||
filename: values[1], | ||
storage_bucket: values[2], | ||
}) | ||
@@ -50,3 +52,3 @@ }) | ||
switch (typeof opts.storage_bucket) { | ||
case 'string': this.storage_bucket = opts.storage_bucket; break | ||
case 'string': this.getStorageBucket = staticValue(opts.storage_bucket); break | ||
default: throw new TypeError('Expected opts.storage_bucket to be string') | ||
@@ -95,3 +97,3 @@ } | ||
publicUrl = getPublicUrl(uploadTo); | ||
console.log('entro'); | ||
cb(null, { | ||
@@ -98,0 +100,0 @@ bucket: this.bucket, |
{ | ||
"name": "multer-gcloud", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "A storage module for connect with multer.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
4787
93