-1
I created a root storage reference in firebase web through the code below:
var storageRef = firebase.storage().ref();
var uploadTask = storageRef.child('img-tour/' +files[0].name).put(files[0]);
However, I need to cancel sending the image if it is in the image. For example, if the image paisagem.jpg
is in the firebase Storage and when trying to send it again, I want the upload to be canceled/stopped. How do I do this using firebase?
Thank you Paul for the force. Be in doubt what to put in "// File already exists. Do not send" in "// file does not exist." and in 'Storage/Object-not-found'.
– Estudante
if the getDownloadURL function returns a url in promisse. it means that there is a file for a given path. otherwise promisse is rejected and the error is equal to 'Storage/Object-not-found' is because the file does not exist in Storage, so you can send the file.
– Paulo Busato Favarato