Is there any option to link to an existing file and do not move/copy the file to the drupal files directory?

Existing file in /mount/media/pictures/picture_1.jpg
and reference this picture with filefield_sources widget and do not move/copy the file to the drupal dir.
The request serves the file from /mount/... directory.

Thanks

Comments

drupal a11y’s picture

This feature would be great!

millenniumtree’s picture

Issue summary: View changes

I just discovered the "Autocomplete reference textfield" option.

This works as long as the file is in your File System path. (sites/*/files, or whatever you have configured)

This is especially useful for large files (like videos), as it doesn't make a copy of the file. It's exactly what I needed.

Linking instead of copying improves efficiency of any reverse proxy you might have, or just browser caching in general.

profak’s picture

Status: Active » Closed (won't fix)

Unfortunately all files for linking must be under Drupal private/public files. You can switch for private files and can tell Drupal where to search/store files (even outside Drupal root). FileField Sources already has support for Drupal private files.