Is there a way to rename a Attachment?
I can download the file, deleted it and upload it again with another name. But is there a way to simply rename it on the server?
Please specify what version of the library you are using: [ 1.3.5 ]
Please specify what version(s) of SharePoint you are targeting: [ Online ]
Hi @Dangerous-Mind,
I don't think it's possible to rename an attachment but to delete and reupload with a different name.
@koltyakov
That can be tricky because the file can be big and can potentially be lost during the process.
It would be nice to be able to rename using pnpjs.
Can it be developed?
Nope, it can't be developed until corresponding functionality is a part of REST API. PnPjs is REST/Graph client but not a magic stick, so the API capabilities are our limitation.
Re-upload logic can validate that the attachment is uploaded with a new name before deletion.
Thanks @koltyakov