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.
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