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.
1 Answer
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
-
Thanks for the answer.Anuttama Chakraborty– Anuttama Chakraborty2020-05-11 16:37:55 +00:00Commented May 11, 2020 at 16:37