Skip to content

Commit

Permalink
add metadata to google storage
Browse files Browse the repository at this point in the history
  • Loading branch information
xquanluu committed Jul 28, 2023
1 parent a507f67 commit e173c12
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/record/google-storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.'));
Expand Down

0 comments on commit e173c12

Please sign in to comment.