diff --git a/lib/record/google-storage.js b/lib/record/google-storage.js index a833504a..842e2215 100644 --- a/lib/record/google-storage.js +++ b/lib/record/google-storage.js @@ -9,7 +9,9 @@ class GoogleStorageUploadStream extends Writable { const storage = new Storage(opts.bucketCredential); this.gcsFile = storage.bucket(opts.bucketName).file(opts.Key); - this.writeStream = this.gcsFile.createWriteStream(); + this.writeStream = this.gcsFile.createWriteStream({ + metadata: opts.metadata + }); this.writeStream.on('error', (err) => console.error(err)); this.writeStream.on('finish', () => console.log('Upload completed.'));