Skip to content

Commit

Permalink
Fixed quota problem with generateThumbnail (#643)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Ovide committed Jun 7, 2021
1 parent 222d141 commit a0d09df
Show file tree
Hide file tree
Showing 5 changed files with 931 additions and 724 deletions.
4 changes: 2 additions & 2 deletions functions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,13 @@ const generateThumbnail = functions.storage
destination: thumbFilePath,
metadata: metadata,
})
.then((_) => bucket.makePublic());
.then((_) => _[0].makePublic());
const uploadMain = bucket
.upload(tempLocalMainFile, {
destination: mainFilePath,
metadata: metadata,
})
.then((_) => bucket.makePublic());
.then((_) => _[0].makePublic());

await Promise.all([uploadMain, uploadThumb]);
console.info("Thumbnail uploaded to Storage at", thumbFilePath);
Expand Down
Loading

0 comments on commit a0d09df

Please sign in to comment.