Adding link to local file in Confluence

若如初见. 提交于 2019-12-12 03:20:04

问题


I would like to add a link to a local file in confluence. Obviously this link would only work if the file is locally on the users computer. I understand that.

If I add the address like this :

file:///D:/dev/ngs-frontend/src/pages/myPage.html

The browser sends me to :

about:blank

If I try to add it with quotes like so :

"file:///D:/dev/ngs-frontend/src/pages/myPage.html"

..confluence crashes!

How is it possible in confluence?


回答1:


As you mentioned when adding the web link in Confluence specifying the file using the file protocol (file:///) you might face the issue that it doesn't work.

Obviously this link would only work if the file is locally on the users computer.

This is not entirely true. If you open the developer tools you most likely will be getting the error "Not allowed to load local resource"

As measure of security the browser won't let you access files from a different origin, specially from the users computer (this would be a serious security risk). Only imagine if you could access the files in the Windows directory from the browser, you could break apart the operating system in no time (or steal user data).

This is explained in here

If you put the file in the same server Confluence is running, then this should work just fine. However I believe you can save time just adding the page as an attachment and loading it (Confluence is pretty decent at version controlling in case you want to modify the html file).

Hope this helps!



来源:https://stackoverflow.com/questions/35505603/adding-link-to-local-file-in-confluence

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!