如何从浏览器打开本地文件? [英] How to open local file from browser?
问题描述
我在尝试打开本地文件时使用以下内容:
I'm using the following when trying to open a local file:
<a href="file:///Users/username/Dropbox/Documents/a/some document.numbers">some document</a>
当我在浏览器中单击以上内容时,它将打开Finder到该文件夹.但是不会打开文件.我是否应该做其他事情以使文件在Numbers中打开?
When I click the above in a browser, it opens Finder to the folder. But does not open the file. Should I be doing something else to have the file open in Numbers?
推荐答案
您只能在浏览器中打开某些类型的文件,例如html
css
js
和mp4
,否则浏览器将要下载它.还要记住,浏览器用%20
替换空格.我建议右键单击该文件并用chrome打开它,然后复制该链接并使用它.
You can only open some types of files in browsers, like html
css
js
and mp4
, otherwise the browser will want to download it. Also remember that browsers replace spaces with %20
. I recommend right clicking the file and opening it with chrome then copy that link and using it.
您可以打开本地文件,只要它是试图打开另一个文件的文件上的文件.
You can open files that are local as long as it is a file that is on the file that is trying to open another file is local.
这篇关于如何从浏览器打开本地文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!