What is the process that will allow images stored on a NAS to be attached to nodes that can be rendered with image styles while allowing the file structure on the NAS to be traversed by a Drupal 7 module?
There is a shared folder on a NAS:
There is a virtual directory in IIS, pointing to the share:
Files on the share can be accessed through the website:
There is a custom Drupal 7 module that traverses the network share, creating nodes and attaching images on the share to those nodes as managed files.
The module can find image files on the share using only the UNC to the shared folder. This is problematic when attaching an image to a node as a managed file, since a UNC will not work. This must be done in the module with a URI going through the virtual directory:
So, what I am currently doing is converting the UNC to a URI, and adding an image to a node with that URI. This makes Drupal fail to actually find the file when it attempts to read the source (the URI through a virtual directory) while creating an image style, generating the error:
Unable to generate the derived image located at public://styles/my_style/public/nas/image.jpg
If I render the image without a style, it works with the source of
/sites/default/files/nas/image.jpg. Other styled images not hosted on the NAS are created normally through the same process.
Is there a solution that doesn't use managed files, but will still allow image styles to be generated from images stored on the NAS?
Would I be able to change the public files directory to the NAS?
Any guidance would be greatly appreciated!