Answers for "How to upload base64 string file to firestore"

0

How to upload base64 string file to firestore

const base64str = "data:image/png;base64,....."
firebase
  .storage()
  .ref('path/to/image.png') // specify filename with extension 
  .putString(base64str.split(',')[1], "base64", {contentType: 'image/png'})
// specifying contentType                        ^^^
Posted by: Guest on March-03-2022

Browse Popular Code Answers by Language