Can I upload multiple files with same name in the same folder in SharePoint through rest api?If yes, then please provide example of the rest call of how it can be done.

  • You cannot add file with same name in same folder. you need to replace the old file if you do so. May 7, 2020 at 7:08

1 Answer 1


No, this is not possible. SharePoint treats the file name as the primary key identifier for a document.

so if you try to upload a second document with the same name, it will overwrite the original file with the new one or return an exception "A file with the name xxx already exists".

If you need two documents with the same name, you will have to either place them in different folders within a document library or in different document libraries.

Thanks Baker Kong


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.