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:
parent
2b6ef23ab9
commit
02d7dd5be3
5 changed files with 36 additions and 4 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue