Link to local file

Angel Moreno February 27, 2015

I would like to know how to add a link to a local file within a issue.I am triying with file//C:/example.txt and it does´t work. "Invalid URL" error is raised.

2 answers

0 votes
Robert Lake February 3, 2016

The file call format "[file:///c:/path/to/your project folder/file/example.pdf]" works fine for us for local HDD access. Note the 3 forward slashes after "File:", and that we can accommodate spaces in the path and file name.

In addition, as all our offices have the same drive mapping with replicated files and folders for our project files on our different servers, we can also use:

"[file:///x:/path/to/your project folder/file/example.pdf]",

and this will open the relevant PDF stored on our drive mapped fileshares.

Note that for Chrome to process the File call correctly, you need to do two things:

  1. start Chrome like this:

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" "--enable-extensions --allow-file-access-from-files"

     2. Install the LocalFiles add-in by going to the following:

https://chrome.google.com/extensions/detail/jllpkdkcdjndhggodimiphkghogcpida

The issue we have is that the above works fine for file types that the Browser can open internally. But it won't work for other file types, e.g. *.docx, or *.xlsm. In these cases the Browser finds the file OK but it just opens a dialogue to "Save As", which is not appropriate.

0 votes
Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 27, 2015

Hi Angel,

try something like that:

[file://c:/path/to/your/file/example.txt]

This works for me. It should work with Internet Explorer, other Browsers don't support local file links without plugins, as far as I know.

 

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 27, 2015

And remember that it refers to the *client* machine. If you put that in JIRA, you are assuming that everyone who may want to click on the link has a file at c:\example.txt (Fun if you're on a Unix based machine like I am)

Amir Vegdani May 12, 2015

Hi Nic, I get a broken link when the file name has space in it. Please help me out on this. Thanks

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 12, 2015

You will need to escape unusual characters - file://c:/path/my\ file.txt

Amir Vegdani May 12, 2015

Hi Nic, Thanks for prompt reply. Issue here is I have got space on the folder name. For e.g. file://c:/my world/file.txt Due to a space in folder name "my world", I am getting broken link. Is there a way to manage this in JIRA. Thanks

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 12, 2015

Same answer, escape it.

Mathieu Garoutte January 15, 2016

Hello There,

I'm facing some issue with the local link on 5.8.10 on my side...

when i edit the page and create a link like "file:\\C:\localRepository", if i save it then there is no html code generated.

I've also tried to add it directly using the html macro and inserting directly

"<a href="file:\\C:\localRepository">follow the link</a>"

same result, the code disapear when saving my page

 

does anyone faced the same issue ? 

Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 15, 2016

Hi Mathieu,

did you try using slashes instead of backslashes ?

 

Suggest an answer

Log in or Sign up to answer