Picture of Chris Gillison
Linking to a shared company drive
by Chris Gillison - Wednesday, 13 September 2017, 10:04 AM

Hi all,

I've been given a link to include in an adapt piece I'm doing but it's a relative path to a shared company drive. The link follows this format...G:\some_folder\some_sub_folder\another subfolder\another_folder\

The final piece will be run on a Kallidus LMS, and I'm wondering how I write the link in my components.json. I've taken a wild stab in the dark with the following (note the '%20' (a guess) for a folder name that has a space in it):

<a href=\"file://G:/some_folder/some_sub_folder/another%20subfolder/another_folder\" target=\"_blank\">Link text</a>

...but I fear this may be all kinds of wrong as I'm really not too clued up about paths. Is what I'm trying to do even possible?

Any guidance would be very much appreciated (before I submit it to the client for testing and they tell me the link doesn't work!).

Thanks. Chris

Picture of Matt Leathes
Re: Linking to a shared company drive
by Matt Leathes - Wednesday, 13 September 2017, 11:05 AM

You need another forward-slash in the file protocol part, it requires three slashes i.e. file:/// apparently because there is no 'domain' part to a file URL.

You definitely want to test this fully - or at the very least warn the client to if this is not something you have access to. These sorts of links are very prone to issues. For example, there's no way that link would work on a Mac because only Windows has the concept of 'drive letters'.

Equally a Windows user may not have that network drive mapped to G:\

Might be better to use the UNC path style i.e. file:///\\servername\drivename\folder\folder\file.txt - not sure if that would be any better on a Mac though.

You're correct about %20 representing a space in URLs.

Picture of Chris Gillison
Re: Linking to a shared company drive
by Chris Gillison - Wednesday, 13 September 2017, 12:31 PM

Many thanks for the insight Matt.

'Suck it and see' time I guess. That's my problem - I don't have the access to fiddle around.

Picture of Mathew Gancarz
Re: Linking to a shared company drive
by Mathew Gancarz - Wednesday, 13 September 2017, 5:50 PM

I've had a lot of experience trying to add links like that in internal wiki and process documents. It's always a crapshoot if it works, security settings around local file access may block it too. Behaviour will vary by OS and by browser also (for example IE 11 will open Windows Explorer at that file path, but Google Chrome and Firefox will open it in-browser with an FTP style interface as though your browsing files on a web server).

As Matt said, using file:///\\sharename.serverfullname.com\folder type links is probably our best bet.. I also make sure that people can copy/paste the link into Windows explorer easily also.

Picture of Chris Gillison
Re: Linking to a shared company drive
by Chris Gillison - Thursday, 14 September 2017, 12:12 PM

Thanks so much Matthew (at least I'm not the only one who's been burdened with what seems to be a pretty thankless task!).

I'd already forseen there might be some inconsistencies based on browser (IE opening Windows Explorer etc).

I think the whole idea needs to be 'rethought' to be honest (polite-speak for 'avoided')!