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