How to convert binary data file to blob of png in react js
I send a request with a blob using form data:
const formData = new FormData(); formData.append("imageFile", blob, "image.png");
On the server where I handle that request I want it back as a blob but it’s a file that I extract from the FormData.
Maybe I can use the buffer? I get a Buffer element when I do:
const imageFileData = fs.readFileSync(imageFile.path);
Please help me 🙂 thanks