1

Is it possible to overwrite file in document libraries with versioning enabled?

I am unable to find any information about this.

4
  • Question is not clear. Is it about OOB interface or custom code? Mar 28, 2017 at 10:21
  • @AlokKumarGupta custom c# code using Microsoft.SharePoint2013.CSOM ver 15 Mar 28, 2017 at 10:30
  • What is an "overwrite" in this i.e. what do you think will happen - all previous versions of file will be removed or the currently uploaded file will become latest version? Mar 28, 2017 at 10:32
  • @AlokKumarGupta currently uploaded file will have same version number which was the latest before upload, overwriting file behind it Mar 28, 2017 at 10:52

1 Answer 1

2

To overwrite file version you should use SystemUpdate method. For a long time is was available only in Server Side Object Model.

According to Office Dev blog post it is now available in CSOM also but only in SharePoint Online/Office 365 environment, as mentioned in this post.

Here is CSOM SystemUpdate method description in MSDN.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.