Skip to content
This repository has been archived by the owner on Jun 24, 2024. It is now read-only.

Commit

Permalink
fix: support all options given to set
Browse files Browse the repository at this point in the history
  • Loading branch information
digitalsadhu committed Apr 17, 2018
1 parent c035fce commit c75e8f2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/sink.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,14 +219,16 @@ 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);
const saveFile = () =>
file.save(fileContent, {
metadata,
resumable: false,
public: options.public !== false,
...rest,
});
try {
return await pRetry(saveFile, { retries: 3 });
Expand Down

0 comments on commit c75e8f2

Please sign in to comment.