0

I'm facing the issue when uploading to SP file which was previously downloaded from there. Metadata fields are getting populated, which I should void.

In fact, I'm trying to replace file, using this method from pnpjs-

    await sp(storage).web.getFileByServerRelativePath(ServerRelativeUrl).setContent(file)

so original file's metadata (the one I'm getting with getFileByServerRelativePath) is getting overwritten by the one file has.

Any ideas how to avoid that, or delete these metadata fields from file completely before uploading using JS? I think just emptying these fields won't help, because then metadata will be overwritten anyway just with empty values. Any help appreciated.

0 Answers0