I am facing 1 issue in Updating document in the SharePoint Document Library. While I am trying updating the document in the Document Library, it will create another file in the Document Library with the same name. But I wanted to update the same document and increase the Version. In the Document Library content type is enabled. I know it is not possible to upload the same file name in the same folder.

SPFile spfile = folder.Files.Add(fileToUpload, cutomFileUpload.FileContent, itemPropertyUpdate.File.Properties, true);

I have upload the same filename and file-type but it creates a new file with the same name.

I know it is not possible to upload the same file name in the same folder.But the same code is working fine for some of the documents, for some of the documents it will create another record with the same file name and metadata property.

Can you please help me to find out the issue?

  • Does the library have versioning enabled? – teylyn Jun 8 '18 at 7:53
  • Yes. versioning is enabled on the Library – Krunal Patel Jun 8 '18 at 7:56
  • Please add properties forms for both documents. – AlexZh Jun 8 '18 at 7:59
  • I'm programatically update the the document. I'm facing this issue for some of the documents only – Krunal Patel Jun 8 '18 at 8:01
  • But you can do screenshots for both. Add them to your question, please. Check in\Check out statuses? – AlexZh Jun 8 '18 at 8:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.