-
Hi All, I am wondering if anyone has an example or can point me in the right direction of how to update a file's binary? I have tried looking at the versions property on IFile as I thought maybe that the update cannot be done directly on an IFile and that you may need to add a new version but that doesn't seem to be the case either as I can't see an add version method on the IFileVersionCollection. The working with files documentation is pretty extensive in explaining how to update the file metadata so hopefully I am missing something obvious. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@Cmcclymo : you just upload the same file again using the same path but specify the overwrite = true. So just add the overwrite = true param to the AddAsync method. See https://pnp.github.io/pnpcore/using-the-sdk/files-intro.html#updating-file-metadata for adding a file. |
Beta Was this translation helpful? Give feedback.
@Cmcclymo : you just upload the same file again using the same path but specify the overwrite = true. So just add the overwrite = true param to the AddAsync method. See https://pnp.github.io/pnpcore/using-the-sdk/files-intro.html#updating-file-metadata for adding a file.