1

Is there a way to get and display a local file's path in Drupal 7?

We have very large files on intranet, so I would like to instead display the file locations.

The ideal scenario would be to browse & select a file. Then instead of uploading the file drupal would save the file path i.e. x://projects/shared/example.mov

2
  • may be NFS can help?
    – xurshid29
    Dec 19, 2013 at 6:09
  • Please tell us how you tried to do it and why it does not work. As far as I know nothing stops you from putting file: schema in content or in link field. It would be a waste of time (both ours and yours) to describe with details ways you already found not suitable in your situation.
    – Mołot
    Dec 19, 2013 at 8:00

1 Answer 1

1

This is a solution for Intranet deployments only.

Install the Any Menu Path and the Filter Allowed Protocols modules.

Enable both modules and add "file" to the configuration > text format > allowed protocols.

Edit the link in your menu to read file:///directory/file.html. Check the box labeled "No Path Validation" and save.

If it still doesn't work, check to make sure your browser doesn't need extensions or privacy settings adjusted to accept the file:/// protocol.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.