Here is an image of my Firebase storage which is used by Android and IOS i want save the same from the web also I am trying this it is storing data but not in the folder
var storesRef = rootRef.child('Audio'); storesRef.put(file, metadata);
Advertisement
Answer
You can use Realtime database’s push keys and get random IDs and use them as your file name in Firebase storage:
var filetype = "mp3" var newPostKey = firebase.database().ref().child('temp').push().key; var uploadTask = rootRef.child(`Audio/${newPostKey}.${filetype}`).put(file, metadata);