I'm currently using the web component on MIT App Inventor to upload a file to firebase storage.
In cases where the file is large in size, it takes a certain amount of time for the user's file to upload to firebase. I want to let the user know that his file has been uploaded when it finishes uploading- maybe update a label to say "Uploaded" or change the color of a label to green.
Is there a way I can determine whether a file in a particular firebase path has been changed/updated? I was thinking it would involve the metadata of the file on firebase- since the metadata contains the time of upload.
I didn't find any concrete solutions online- any help on this topic is appreciated. Maybe an extension or web component block that can make this work.
Is this enough to save the response to a tag named "ReturnedData" in my database?
Can I use the DataChanged block to know when the tag value changes? When it does, I can tell the user that the file has been uploaded.
Probably not, because if another file is uploaded then it will overwrite the existing data of the previous file, which will be needed in order to view/download the file in the future....
If the user is uploading the file, then they will know this because they will get the confirmation that the file is uploaded. Is someone else somewhere else changing the uploaded file ?
Do you need to inform all users that a file has been uploaded, regardless of who uploaded it ?
In my application, the user uploads a text file to firebase.
This file is then called by an ESP8266, which is then sent to a microcontroller unit to rewrite its firmware.
The textfile is the firmware of the microcontroller. The file will be changed when the user wants to rewrite the firmware of the microcontroller. He will upload a file maybe once a month when he wants to update the firmware remotely.
The previous file, is hence, not important to him- he already has it.
If there is only one user, and they are uploading the file to firebase storage, then they will know that they have done this, and will get a return after the upload confirming this.
To answer your question, the dataChanged event block provides for a tag to be tested and for the value of that tag to be captured/displayed. The only quirk with the dataChanged event is that the client (device) must initiate contact with Firebase, perhaps by sending a request or posting s dummy value, in order to get the dataChanged process running.