1

I am able to upload file and update meta data columns in SharePoint 2013 document library using 2 separate REST calls but it was 2 versions were created when I saw version history.

Is there is any way so that only 1 version of file will get created using REST? OR I am doing somewhere wrong?

1 Answer 1

1

Hello @VishwanathMishra,

I was having same requirement in past. There no direct solution for this, but we have a trick to acheive requirement.

  1. Upload the document using your code and this will create first version of your document.
  2. Disable the versioning on the document library through another call
  3. Update the metadata
  4. Again enable the versioning on the document library.

I have used this trick and this worked. Other than this I don't think there is any other solution.

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.