As a bit of follow-up – to better understand issues and going beyond getting the links to work:
Why doesn’t the URL conversion occur “auto-magically” with an Observable cell, whereas it does for an HTML file sitting on my computer?
That is, with a standard HTML file on my computer, the browser takes the windows path, downloads the file, and shows me in the download tabs that it did so using the file:// syntax.
Also, if I supply the path with from a CSV file with JavaScript, the path looks to be working OK
However, clicking the cell won’t draw down the file, although I can use the mouse to ‘copy path’, which will copy in the file:// syntax and, if pasted in my browser manually, downloads the file as expected.
it’s unfortunate that one must implement such a conversion
Here’s a trick that might help. If you type / paste the path to your local file into the address bar in a new browser tab and hit enter, your browser should automatically convert it into a new file:// url that you can copy and paste.
For the paths coming from CSV files, you could use a function to convert the URLs; here’s one adapted from a JSfiddle:
why doesn’t this conversion occur “auto-magically” with an Observable cell, whereas it does for an HTML file sitting on my computer?
I wasn’t aware that you could do this with local HTML files – my guess would be that is because browsers are inclined to relax security restrictions in favor of convenience in that setting. There’s a little more discussion about security and local file paths in this SO answer. That may go part way to explaining “weird” behavior.
Thank you for all the research and links. This is super informative!
From the the SO information you linked, and as verified with a bit of testing, it doesn’t seem possible to use the file:/// protocol on Observable and have it download files on one’s computer. When I do this (assuming because the browser is reading the URL path as as file://localhost/C:/User/aaron/1.doc) the page attempts to open a separate Observable window—and clearly that file won’t be found on Observable. This same thing happens when trying to download and host the notebook elsewhere, like GitHub or AWS—localhost will not refer to your local computer, but to the sever hosting the file. This windows computer I am using won’t allow me to run a local http server (like with python), so that may work, but it’s an extra step anyway so not well suited to my purpose (which is to describe a body of literature sitting on a shared Windows network drive).