Confluence: How to place a link to a file on a server share in a confluence page?

Hi,

I'd like to have a link like this on a Confluence page: \\<server>\<$share>\installer.msi

I tried placing it in as is, and doesn't work. Also tried file:///\\<server>\<$share>\installer.msi but that doesn't work either.

Any ideas?

16 answers

1 accepted

This widget could not be displayed.
Ted Costales Atlassian Team Aug 30, 2017

Hello folks!

I see that this thread has had a lot of attention over the years and I'd like to summarize the answers that have been presented thus far, since there are worthwhile observations that people have made.

First: in the case of @Eric Blair1, there is no specific way to accomplish this in 100% of browsers without using some type of intermediary routing service. As you can see in the answer with the most votes, some browsers support opening file paths in this fashion: [jump link]

However, it does not work as a full solution. Setting a CNAME record like @Laurent Corbière had suggested might work for your needs: [jump link]

There are also alternate solutions such as what was presented by @Thomas Peter Berntsen where you can use an addon from the Atlassian Marketplace: [jump link]

At the end of the day, it depends on your browser environment. @David Skreiner2 posted a knowledge base article that explores this in brief as well: [Knowledge Base link]

Thanks everybody for their participation in this question!

This widget could not be displayed.

Using Confluence 5.5.2, the following syntax worked for me on Chrome, FF, and IE:

file:///server/share/etc

The path to which I was trying to link contained spaces, so I had to place this in brackets:

[file:///server/share/etc/some path/with spaces]

Just to add, make sure you use forwards slashes (/) and not the backwards slashes (\) that Windows likes so much or the links won't work

our confluence page just decided to add "/" in front of the address, so it became
"/[file://......"
and it does not work with below error:

java.lang.IllegalArgumentException: java.net.URISyntaxException: Illegal character in path at index 1: /[file:/.......

This widget could not be displayed.

Try file://///server/.... and check on both IE, Firefox, ... . It is a pain getting something that works for multiple browsers.

The 5 forward slashes works like magic for us!

This widget could not be displayed.

I don't think this type of link works in Firefox due to security restrictions. There are a few other write ups on this if you google it.

IE does work though from my past experience. In Confluence though, I don't think you have to be that specific with the syntax, you should be able to put in the server address and the link should just work. I overthought this some time ago only to find out that you don't have to be that tricky.

This widget could not be displayed.

if you use NoScript you have a bigger problem, but there is a workaround:

- enable it in noscript settings (open local links-checkbox)

and add (only for this case) the following entries:

user_pref("noscript.policynames", "localfilelinks");	
user_pref("capability.policy.maonoscript.checkloaduri.enabled", "allAccess"); 

Now file:///-Links work on sites when they are in NoScript-Trusted-Sites...

If you want to go one step further (and open file:/// links not only inside of FireFox, but in Windows Explorer), you have to set the following settings (additionally)

	user_pref("network.protocol-handler.expose.file",false);
	user_pref("network.protocol-handler.external.file",true);  

First time you click on a file:///-Link you will get a prompt from FireFox to select the program with which you want to open them -> choose "C:\Windows\Explorer.exe" and don't forget to check the "remember"-checkbox.

From that time they will open directly in Windows Explorer - very useful ;-)

Hint: NoScript overwrites this setting again on each FF-startup. So my only workaround was to write a small FF-Plugin who overwrites them again ;-)

This widget could not be displayed.

We always use this format for opening network folders or files from IE9:

file://SERVERNAME/PATH/FILENAME

Do NOT use a drive letter like C: but the Servername.

And make sure you use / (SHIFT+7) instead of \

In IE9, links to external network drives and files only work if you add the URL of your WIKI to the "Trusted Sites" in the IE9 Internet Security Settings of the Browser.

This is the format that finally worked for me.

Type the following into the editor

[file://SERVERNAME/PATH/FILENAME WITH SPACES]

(the brackets disappear, and the resulting link opens a "Open/Save/SaveAs" dialog box)

What browser were you using?

This widget could not be displayed.

Hi Eric,

Indeed, this is a security browser issue.

The workaround I'm using is to get an https url for your folder. I don't know exactly how to do it because it's our network dept who's in charge of it.

It's call a cname and it works perfectly if the folder is in public share.

http://en.wikipedia.org/wiki/CNAME_record

So your

file://folder/installer/installer.msi

will become

http://publicfolder/installer.msi

Have a nice day,

Laurent

This widget could not be displayed.

Hi Eric,

The "Infinidex" plugin which we've developed for searching and linking files on network shares within Confluence helps with exactly this (and automatically works around some of the browser quirks wrt linking to files).

Check it out on: https://marketplace.atlassian.com/plugins/dk.translucent.atlassian.confluence.infinidex

Best,
Thomas (Translucent - developers of Infinidex)

This widget could not be displayed.

This has nothing to do with browsers and all about Confluence.  I can put file://server/folder name into my browser and hit enter and a windows explorer window opens with my files.  I put any combination of all of the above in Confluence (why do I keep wanting to type confustion?) and it doesn't work.  In fact the string I use to put the link behind doesn't even show up as a link.  I'm using 5.7.3 of this POS.  What is amusing is all the claims of it working above have different solutions.  None of which work for me.

I thought I had it by creating the link in OneNote and copying it into my confluence page.  It at least showed up as a link while editing, but as soon as I saved it the link was gone..

This widget could not be displayed.

It works with firefox. See the

https://developer.mozilla.org/En/A_Brief_Guide_to_Mozilla_Preferences#modifying

and

http://kb.mozillazine.org/Links_to_local_pages_don%27t_work#Using_an_Extension

the gist of it is to create a user.js with the following content

user_pref("capability.policy.policynames", "localfilelinks");
user_pref("capability.policy.localfilelinks.sites", "http://servername:prot");
user_pref("capability.policy.localfilelinks.checkloaduri.enabled", "allAccess");
This widget could not be displayed.

I'm sorry - I'm kind of new, but could you please explain where this should go. I want to be able to open a HTML site that is saved on my server (S drive).

The address is: file:///S:/SUPPLY%20CHAIN/Dashboard/dashboard.html but I can't seem to get it to link to it no matter what I try.

This widget could not be displayed.

This one works with Confluence 5.5.2 with IE 9

[\\servername\share] - to link network share folder

[\\servername\share\file.txt] - to link network link

catch is you need get the conflunce to contruct the link so

type [ first

then copy paste the whole link and then type ]

This widget could not be displayed.

I have Confluence 6.0.2.  Can you please tell me how I can open an HTML file that is saved on a network drive?

The address is:  \\servername\folder 1\folder 2\file.html

Note: the folder names have spaces.

I tried the suggestions posted above but none of them work.  I can add a link to the file but the file cannot be previewed or opened.  Any idea why?  Can you please help? 

Thanks in advance!

Ted Costales Atlassian Team Aug 30, 2017

@Grace San Juan There are few other threads which talk specifically about network file access, but in general the same rules apply: due to most modern browser security policies, opening a network space from a URI is generally restricted. You'll want to consider hosting the HTML file through an intermediary web server - or, if the point of the network link is to provide the code to users, consider posting the code in a restricted form.

If you need any further assistance with this, please open up a new thread and the community team will be happy to help! Here are some additional threads for you to explore (with similar answers as discussed in this thread, though): [Community jump link]

This has nothing to do with browsers and all about Confluence.  I can put file://server/folder name into my browser and hit enter and a windows explorer window opens with my files.  I put any combination of all of the above in Confluence (why do I keep wanting to type confustion?) and it doesn't work.  In fact the string I use to put the link behind doesn't even show up as a link.  I'm using 5.7.3..  What is amusing is all the claims of it working above have different solutions.  None of which work for me.

I thought I had it by creating the link in OneNote and copying it into my confluence page.  It at least showed up as a link while editing, but as soon as I saved it the link was gone..

This widget could not be displayed.
Ann Worley Atlassian Team Oct 30, 2017

Some customers have found the workaround on this ticket to be helpful: 

Expand external links security filtering to allow digits, plus, hyphen and periods in protocol

This widget could not be displayed.
Ivan I'm New Here Jun 07, 2018

Hi @Ted Costales / @Ann Worley,

I cannot seem to make this work in Chrome Version 66.0.3359.181 (Official Build) (32-bit).

Works in IE Version 11 on the same machine.

Any ideas? Is this to do with Chrome?

Ted Costales Atlassian Team Jun 07, 2018

Based on your brief description this does sound like a browser-side rendering issue. Per the original analysis and summary it really comes down to "how a browser interprets URIs meant to point to local-side resources", so if it works as expected in another browser but not with Chrome 66, then it is likely Chrome's rendering engine is probably "cleaning" the links in some way.

Hey @Ted Costales , we are having the same issues and has taken away one of the Confluence functionality to link files on network location. Since Chrome is supported browser isn't there should be a fix/patch to handle that.

Would appreciate if there are any workarounds.

Thanks,
Madhu

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted yesterday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

155 views 2 4
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you