So I am to implement a feature that allows users to select multiple images, and when they are ready, they can upload the images at once to Firebase Storage shown as screenshot below:
mediaList
is a component state variable that stores a list of ready-to-upload images, the data type is List<Uploaded File (Bytes)>
. Action 1 executed successfully (as the images has uploaded to the Storage in the directory users/<id>/uploads
), but the problem happens on Action 2.
In Action 2, I wanted to create a document in Firestore upon user submission. The submission was successful, but only the field media_img
to store a list of image paths for displaying later was empty. In the end, I couldn't display the images that particular user uploaded. I am not sure whether the option I chose was correct, FF did not show any error either.
Here are the screenshots for reference (Action 2 and records
schema):
Any help and explanation would be appreciated!