I want to start a new hobby, where I post the solution to something I can’t find 2-3 google away. If I can’t Google and find my solution in one-shot. I’ll write a short tutorial about it. So here comes the first in this blog.
I want to start a new hobby, where I post the solution to something I can’t find 2-3 google away. If I can’t Google and find my solution in one-shot. I’ll write a short tutorial about it. So here comes the first in this blog.
If you want to create an upload image endpoint inside Google Firebase (Cloud functions), then here is one way you can do it.
I’m new to Google Firebase and Cloud functions, so this might not be the best way to do it, but it works
So what we did was
Process the form data using busboy
Store the image in a temp directory
Upload the image using firebase-admin storage module
But what about multiple files upload at once?
You can modify this line
and instead of replacing filepath you create an array of file paths instead. After that, process the filepaths array accordingly in