Now that file.name is a read-only property, I’ve found this to be the best method to rename a File object in the browser:
const myNewFile = new File([myFile], 'new_name.png', {type: myFile.type});
Now that file.name is a read-only property, I’ve found this to be the best method to rename a File object in the browser:
const myNewFile = new File([myFile], 'new_name.png', {type: myFile.type});