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?