I need to change the filename (not the file, just the metadata of the name) when uploading to a sharepoint site.
I figured that it would be easy enough to change the htm
A simpler and more memory efficient approach - change the file's 'name' property to writeable:
Object.defineProperty(fileToAmend, 'name', {
writable: true,
value: updatedFileName
});
Where fileToAmend is the File and updatedFileName is the new filename.
Method from Cannot assign to read only property 'name' of object '[object Object]'