Added a function that downloads a file from the storage bucket given its path, change the size of the thumnails to 256 per side

This commit is contained in:
Mariano Uvalle 2019-04-07 20:29:51 -05:00
parent 2b6ef23ab9
commit 02d7dd5be3
5 changed files with 36 additions and 4 deletions

View file

@ -42,7 +42,7 @@ export const generateThumb = functions.storage.object().onFinalize(async object
const thumbnailLocalPath = join(workingDirectory, thumbnailName);
await sharp(tmpFilePath)
.resize(124, 124)
.resize(256, 256)
.toFile(thumbnailLocalPath);
// Upload the resulting thumnail to the same directory as the original file.