Add link to open a local file in Google Docs
Asked Answered
U

4

24

I have made a guide (or something like a tutorial) about my tool to share with my company. I used Google Docs to do that, and I would like to add links to open video guides. I want to know a way to add link in the document.

Unchartered answered 29/8, 2014 at 9:39 Comment(2)
I wonder if there is a way using a "user script" (cf. Tampermonkey).Muller
This has nothing to do with Google docs.. Hence answers given here are the same as if you had asked how do you , within an Ms Word document, add a link to a local file. Which is also nothing to do even with Ms Word. It's simply asking how to add a link to a local file. Links are normally in webpages though other platforms can support them. After that, one can say, I see that google docs doesn't support file:///c|/carp/a.txt or file:///c:/carp/a.txt but u can always do 127.0.0.1/a.txt youd have to set up a web server. Nothin to do with gdocs. Same applies from any webpage.Satisfactory
K
12

What I do is the following. Links in sheets ( or in your case Docs) only respond to internet protocols e.g. HTTP://, HTTPS:// and so on... . It does not respond to file explorer protocols (like excel or word does) e.g. file:\\ or C:\.

So I installed WampServer (any other server will do as well, I just use this) and then copied the files into the WWW folder.

Now you can link to files that way. Google Docs/Sheets accept links to localhost as acceptable files to establish a link.

Be aware, your server will have to be online for the links to work. But this is how I solved my problem without uploading items to the cloud that I want to keep private and still use in google docs.

This is just for my local computer, if you want to share the doc with others in a local environment a little more understanding of your local server operations will be needed (i.e. do not use localhost, but refer to your IP-address).

The server can be scale-able on your local network as well, at this point a little more education will be required.

However, if you want to share the doc with others around the world this will not work at all

Kristofer answered 10/8, 2017 at 0:15 Comment(3)
The node-based http-server is a fine server. Install it globally npm install http-server -g, then open a terminal window in the folder with the files and run http-server. Files are accessible at localhost:8080/path/to/file.jpgDenysedenzil
can do python -m http.server 8080 and access 127.0.0.1:8080 but anyhow, I don't think google docs would be able to write to the document so it's fairly limiting. And where is google doc's option to open a URL anyway? btw 127.0.0.1:8080/sdfs.docx doesn't open it it just leads chrome to download itSatisfactory
@Satisfactory (and others) see [my answer] to your follow-up question How do you access local documents via HTTP from Google docs, assuming you have a web server set up?Mulligatawny
A
7

What I do is upload the files on Google Drive, and post the shareable link on Google Doc. Works like a charm!

Abednego answered 3/7, 2018 at 21:40 Comment(2)
The question was about adding a link to a local file. If you've uploaded the files to the cloud, they're no longer local files. Ugh, cloud everything.Savanna
I was considering local links to my images but this idea might be better for me since then all the images are together.Discomposure
S
5

Try Redirector. It's simple Chrome/Firefox add-on for redirections. You can add before your path "http://" - Google Doc will be OK with that, then just configure redirection rule in addon. Rule can include wildcard or regular expression.

Sporocarp answered 8/5, 2020 at 15:27 Comment(4)
I'm trying and it works with http links BUT NOT with C:\Users\ paths or file:///C:/Users paths .. what do I do wrong?Elston
@Sporocarp — I've tried this, but I can't make it work. Could you please include an example?Oculo
The following redirector rule seems to be working for me: Example URL --> http://C:\temp\foo\bar Include pattern: --> (http:\/\/C:\)(.*) Redirect to: --> file:///C:$2 Pattern type: Regular Expression also this is a great site I have used for years for testing regex, regexr.com full credit to gskinner :> gskinner.comSupernational
Would that force the browser (Edge) to "download" (copy) the local file into the Downloads folder, creating an extra copy of the file, which you have to click on in the Downloads folder to open? Is there any way to just open the local file immediately after clicking on the link? Thanks.Galbreath
L
0

For future readers - You could try linkyourfile.com (I am the developer of it)

It is a windows and mac extension for explorer and finder with which you can create an https link to a local or network file / folder. If you click on the link the extension will launch the file or the explorer / finder.

It also has some other useful features:

  • Cloud provider placeholders to fix the problem with e.g. different dropbox locations on different devices.
  • If a file / folder can not be found you can relink it and on the next link click it will be auto detected again.
Lucre answered 31/7, 2023 at 13:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.