You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
uploadTask .on('state_changed', (snapshot) => {
// Observe state change events such as progress, pause, and resume
// Get task progress, including the number of bytes uploaded and the total number of bytes to be uploaded
const progress = Math.floor((snapshot.bytesTransferred / snapshot.totalBytes) * 100);
console.log('Upload is ' + progress + '% done', 'for ', file.name);
})
Can i get upload progress when upload a string like this ?
import{getStorage,ref,uploadString}from"firebase/storage";conststorage=getStorage();conststorageRef=ref(storage,'some-child');// Data URL stringconstmessage4='data:text/plain;base64,5b6p5Y+344GX44G+44GX44Gf77yB44GK44KB44Gn44Go44GG77yB';constuploadTask=uploadString(storageRef,message4,'data_url')uploadTask.on('progress',()=>{//get progress })
Can i get upload progress when upload a string like this ?
The text was updated successfully, but these errors were encountered: