Links to local files

I’m a new Coda user and enjoying learning how to use it.

In Coda I would like to use URLs that point to my local file system, specifically to images, so that I can view the images in Coda alongside other data.

I’ve tried inserting links like file:///Users/wallace/tmp/sample.jpg, which works fine my browser to show that image, but Coda isn’t happy. It always says, “Invalid embed URL,” whether I try simply pasting the link into open space or entering it in a formula:

=embed("file:///Users/wallace/tmp/0_CS_3103_20200603_090704_Daylight809_A.jpg",0,0,force: true)

I realize that pointing to local files may seem old-fashioned when using a browser-based tool like Coda, but my team and I are working with a large library of images and not so speedy internet connections. I know that file links are OS-dependent, but luckily my small team is all using Macs and can use standardized paths.


Dear @Wallace_White, welcome to the community

When you are on the canvas and select “/” you will get a menu from where you choose “image”, automaticly will pop up the interface from where you can select any image (local and cloud location)


Hi @Wallace_White, Welcome :smiley:
I have not a solution ready for you but i have some ideas :slight_smile:
If i’m correct you want to not upload images on coda serves (or other cloud services like google drive) because you prefer to keep those in your team macs (or servers)
The first idea is to create a public folder where you upload using your scheme all the images (like if your folder is a server, then you just use those link to coda)
This is probably the best and most “future-proof” way (not really future proof btw but for some times it should be ok :D)

The other idea is to have a table that know your file directory (like a table that re-costruct the url of the local images based on info about that particular images, like date or tags or whatever) so then with a button you just open it in another page on the browser
This should work something like “This row is 12/12/20, made by tom, his name is ‘me eating banana’” so the url creator formula should do something like:

That with a button can be opened in a new page that should correctly link to your local file :slight_smile:

P.s. i’ve not tried this but i’m pretty sure that it should work :slight_smile:

P.p.s. The best approach will in every case be uploading those picture on some server, coda if you like or some other servers and use those links :slight_smile: But i like your sense of “fuck off cloud” so i’m also curious about this idea :smiley:

Thanks, Jean Pierre and Mario, but the obstacle I’m running into is simpler. I don’t see a way to get Coda to use URLs that point to local files at all.

All of us with Macs probably can successfully open the following link in our browsers:

Can you link to it in Coda, like you would link to a web image, without getting an error?

Jean Pierre, if in Coda I use /image and select this file through the UI, Coda uploads the file to a Coda server and henceforth uses that. Coda displays it nicely, but it’s no longer pointing to the local file on my system.


Dear @Wallace_White,

Thanks for the additional explanation, making your intention more clear
It’s not possible the doc to point to local files and to load them when you open the doc.

@Wallace_White have you tried using a button? you can configure it to use data in tables :slight_smile:
In this way the only things that coda do is to open a link that point to a local file in a new page, i try this now and i’ll tell you if it works! :slight_smile:

Update: an error is given, “Attempting to open an unsafe url”, yeah, this is blocked by coda…
We should wait for a codan here :slight_smile:

I don’t think it’s just Coda that’s unhappy — IIRC it’s your browser that won’t let you include local files if the page is not loaded as local file either. It’s basic cross-origin security.

Not sure though, it has been ages since I last looked at HTTP standards.

UPD. Yes,

browsers do not allow websites to reference files from the user’s local file system. This is for security reasons, to prevent a malicious site from reading the contents of your computer without your knowledge. (gosh it’s hard to find an answer in simple terms to this)

OK, I’ll stop trying the local file approach. Thanks, everyone.