I'd like to use the File System setting "Private Method" in order to keep every file uploaded via Drupal to stay in a private folder located outside of the Drupal root. The image module appends this path to its "images" folder path. And, at the end, the YUI editor will base its path calculation upon the image module's settings (AFAIK).

Alas, image upload fails if images folder set in /admin/settings/image (Image Module) is outside of Drupal root.

It works fine, though, with private method enabled if the images folder is inside inside the drupal root on the server.

The image is actually uploaded to the folder, YUI RTE shows briefly the path, and then strips everything away (the input format is set to full HTML). I've catched the URL YUI RTE shows, and it appears that YUI adds a trailing slash to the path.

And, apart of the trailing slash, YUI doesn't seem to write the path into drupal's DB, since live editing the output page with Firebug and manually replacing the image URL with sth like /system/files/images/myimage.JPG doesn't work either (image won't show).

I've tested with a folder located outside the drupal root, with proper permissions set,
and a relative path for the files folder in /admin/settings/file-system, for instance, sth like:
../../../home/myprivatefolder

I've also tried to set it relative to the root folder, for instance changed it to:
/home/myprivatefolder
to no avail.

Is this by design ?

Any insight most welcome!

Additional info:
Using YUI libs v.2.5.2 locally
Module Private Upload not installed
Modules Token and Upload Path disabled and uninstalled
Clean URLs enabled (but same if disabled)

Comments

dda’s picture

Title: YUI Editor image upload fails if images folder is set outside of Drupal root » Image upload fails if images folder is outside Drupal root
cmgui’s picture

I have the same problem with Drupal 6.4 and yui_editor-6.x-1.2-97.

Thank you.

eriktoyra’s picture

I have the same problem. It is no big deal in my case since the installation of our intranet is behind firewalls. I guess this could be by design because the images has to be accessible via HTTP? In this case, maybe we shuold have a separate upload folder for these kind of images?

Additional info:
Drupal 5.5 (I know, I should upgrade)
YUI Editor 5.x-2.6-96
YUI 5.x-2.4-beta2
Image 5.x-1.9