![](/img/trans.png)
[英]How can I upload multiple files to a firebase storage ref using javascript ?
[英]How can i upload files on Firebase storage inside folder with key generated names using JavaScript
您可以使用實時數據庫的推送密鑰並獲取隨機 ID,並將它們用作 Firebase 存儲中的文件名:
var filetype = "mp3"
var newPostKey = firebase.database().ref().child('temp').push().key;
var uploadTask = rootRef.child(`Audio/${newPostKey}.${filetype}`).put(file, metadata);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.