Created
May 25, 2020 14:29
-
-
Save jirawatee/8b4c08055c9f3bdf86276192daefd0f3 to your computer and use it in GitHub Desktop.
Resize image by Firebase Extensions - 4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let prefix = `https://firebasestorage.googleapis.com/v0/b/${bucket.name}/o` | |
let suffix = `alt=media&token=${uuid}` | |
return { | |
original: `${prefix}/${encodeURIComponent(file[0].name)}?${suffix}`, | |
thumb: `${prefix}/photos${encodeURIComponent(`/${event.source.userId}/thumbs/${event.timestamp}_200x200.jpg`)}?${suffix}` | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment