mirror of
https://github.com/jambonz/jambonz-api-server.git
synced 2026-07-23 12:32:06 +00:00
add metadata to google storage
This commit is contained in:
@@ -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.'));
|
||||
|
||||
Reference in New Issue
Block a user