vendredi 29 novembre 2019

How to convert a String to actual file that was generated from FileReader.readAsDataURL()

I have generated a string of a file using this:

const reader = new window.FileReader();
reader.readAsDataURL(file);
reader.onloadend = () => {
  var x = reader.result.toString();
  console.log("File String :: ", x);
};

How to get back the actual file using this string?
ReadAsDataUrl




Aucun commentaire:

Enregistrer un commentaire