Windows file path format for link in a Configure Block > Block Body

Events happening in the community are now at Drupal community events on www.drupal.org.
Posted by runnergirl on January 12, 2016 at 9:20pm

System Information:
-Windows Server 2012 Standard
-Drupal 7.4.1
-MySQL

I'm sharing information that worked for me when creating a link in the block body, to a file folder location. Keep in mind that correct permissions would also be necessary to have the desired result of the user clicking the link and having success displaying the files within the folder. But another part of that success would be typing out the file path using the correct structure.
Example:
file:///S:/IMD/APS/Ique_Project/06-Training/R2%20User%20Guides/Final_BPD...

In this example "S" is the mapped drive to the file server "ipers10" (see attachment).
The "%20" denotes a space in the folder name and is automatically placed there for you when a space is entered.

I've also attached a screen shot for the block body link.

AttachmentSize
insert_edit_link.JPG 88.88 KB
S_mapped_drive.JPG 17.76 KB
Categories: ,

Comments

windows share links in Drupal

Posted by Todd_Rector on January 12, 2016 at 9:30pm

Hi,
You will also notice different browsers have different restrictions on whether or not they will allow you to open a UNC link. Chrome and Firefox are both very picky.

As a state of Iowa agency, you might find additional browser restrictions based on group policies.

My two cents -

TR

Opinions and sarcasm are solely mine and do not reflect the views of my employer.

Use the Share Name in the Link

Posted by jkraai (not verified) on January 13, 2016 at 2:12am
jkraai's picture

good screen shots

from what i can see,
file://ipers10/IMD/APS/Ique_Project/06-Tr...
should do the trick

see https://blogs.msdn.microsoft.com/ie/2006/12/06/file-uris-in-windows/

firefox users may still have problems

@Todd_Rector is correct that

Posted by iowatiger08 on January 13, 2016 at 3:46am

@Todd_Rector is correct that Firefox/chrome will in fact not handle Windows file paths well. Also, for Drupal (or any web server) It is recommended to not use absolute mapped drive paths as they may be different for other users and it would be preferred to use the proper network UNC path/network share name. Avoid special characters and spaces in paths or names. It might be better to provide a relative path to the files (like in a file upload) where the web server can access resources.

Central Iowa Drupal Users Group

Group categories

Category

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

AltStyle によって変換されたページ (->オリジナル) /