How to get download urls of resized images from cloud function

1,412 views
Skip to first unread message

Joe Hill

unread,
Sep 15, 2018, 8:21:20 PM9/15/18
to Firebase Google Group
My code goes likes so

Upload a file to storage
Create a doc with the files download url to ('userUID/gallery/randomId') 
A cloud function then runs a function onFinalize() that resizes the image
Here is where I am suck. How can I get the download urls of those images and store them in my doc that contains the original files download url I want to end up with my doc looking like so
{
  originalFile: 'url'
  resizedUrls: ['400x400','800x800', 'etc']
}
I have no way of referencing the doc which has the random id

You can see what I am trying to get here. Create a gallery with thumbnails. 

Thanks Joe

Doug Stevenson

unread,
Sep 17, 2018, 12:47:14 AM9/17/18
to Firebase Google Group
Reply all
Reply to author
Forward
0 new messages