Sometimes, we want to convert Blob to File in JavaScript.
In this article, we’ll look at how to convert Blob to File in JavaScript.
How to convert Blob to File in JavaScript?
To convert Blob to File in JavaScript, we can use the File constructor.
For instance, we write
const file = new File([myBlob], "name");
to create a File object with the myBlob blob object in the array.
The 2nd argument is the file name string.
Conclusion
To convert Blob to File in JavaScript, we can use the File constructor.
