How to clone File objects in javascript?
new File([file], file.name)
returns copy of file
object
new File([blob], blob.name, { type: blob.type });
Adding the type is important. The accepted answer missed the type.
new File([file], file.name)
returns copy of file
object
new File([blob], blob.name, { type: blob.type });
Adding the type is important. The accepted answer missed the type.