(I'm on support staff at Overleaf.)
file: protocol is not supported. The URL needs to be fetchable by our servers. (From our servers' perspective, a URL with
file: in it, and no internet-reachable hostname, would mean to look for the file on our server itself.)
If you don't have access to web hosting to upload files that you wish to use with the Overleaf API, one method is to add the file(s) to Dropbox or another file hosting service that provides public links. Then use the public link URL to the file as the
Depending on the sharing service, you may need to tweak the format of the sharing link in order for our server to fetch a raw copy of the file, not a wrapper page or landing page. More on this for various file-sharing services here: How can I upload files from Google Drive?
On our Overleaf API page we also have some examples where the snippet content can be inlined in the request; however, if you need to pass in multiple files, the
snip_uri method must be used.
?is handled at the server so you would need to run a web server at your side and use a form
?https://yourmachine/url-to-your-filethere is no way the overleaf (or any) server is going to access files on your local disk via a file:// URL.