I'd like to open a .tex file on my local system in overleaf.

The api allows for this over by passing the uri


I would like to do


thank you for any help!

  • it's a general feature of URL handling that the part after ? 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-file there is no way the overleaf (or any) server is going to access files on your local disk via a file:// URL. Jul 3, 2019 at 20:30
  • If that were possible overleaf could steal any file on your pc without you knowing it. Files have to be uploaded to overleaf and processed there end of story.
    – daleif
    Jul 3, 2019 at 20:53

1 Answer 1


(I'm on support staff at Overleaf.)

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

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .