var storageRef = firebase.storage().ref();
var ref = storageRef.child("filename.pdf");
let answ = result.toString("base64");
ref.putString(answ, "base64").then(function (snapshot) {
console.log("Uploaded a base64 string!");
});
I'm using this "result.toString("base64")" for attachment file to email likle string base64, but cant use that for saving to Firebase Storage
Full error:
[FirebaseStorageError [FirebaseError]: Firebase Storage: String does not match format 'base64': Invalid character found (storage/invalid-format)] { code: 'storage/invalid-format', customData: { serverResponse: null } } I got always this error and googled too much, but still haven't any information. I "result.toString("base64")" to attach this like base64 string for sending email and it's working, but not for saving to storage. Could someone help, please?