Closed (duplicate)
Project:
Image
Version:
6.x-1.0-alpha1
Component:
image.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
16 May 2008 at 23:29 UTC
Updated:
17 May 2008 at 10:55 UTC
For any large collection of images, storing all the files in a single directory becomes unworkable.
How (through the API) can I make the Image module or the Image Attach module store an uploaded image in a location other than the default image path?
In my case, I need to choose a subdirectory of the default image directory based on a taxonomic term that the user has set in the node to which the picture is attached, and the value of a field in the user's profile.
Comments
Comment #1
ansorg commentedin theory this module http://drupal.org/project/uploadpath should do what you (and I) want.
In reality, #256210: _image_build_derivatives should leave files in their original location works against the specified uploadpath and puts the images back into /files/images :( see also #257871: conflict with image module: defined path gets ignored (overwritten)
Until now I seemed to be the only one to care about this, no response yet to my bug reports. I tried to modify the image.module myself but got it not working for all possible upload methods :(
Jens
Comment #2
Hetta commentedduplicate of http://drupal.org/node/103793
Comment #3
orthoducks commentedI've read that thread, although I didn't understand everything in the comments. The original proposal is not the same as what I asked about: it is to rename the uploaded image to reflect the owning node ID. That's also a way of organizing images, but it's a completely different way. It would eliminate the risk of conflicting filenames if no node has more than one image, but in my opinion, its usefulness would be much more limited.