diff --git a/lib/sink.js b/lib/sink.js index 13e5b7c..b1a5a66 100644 --- a/lib/sink.js +++ b/lib/sink.js @@ -219,6 +219,8 @@ module.exports = class SinkGCS extends EventEmitter { ); const metadata = { contentType, ...(options.metadata || {}) }; + const rest = { ...options }; + delete rest.metadata; await this[ready]; const file = this[getGcsFile](fileName); @@ -226,7 +228,7 @@ module.exports = class SinkGCS extends EventEmitter { file.save(fileContent, { metadata, resumable: false, - public: options.public !== false, + ...rest, }); try { return await pRetry(saveFile, { retries: 3 });