Node images path setting have a possibility to add variables as %uid, %username, but directories HAVE TO EXIST prior to using this feature.
This makes it useless in large sites with many users - e.g. admin would have to manually create hundreds of directiories with usernames:-(
or maybe I'm missing something?..
I would like to have something like that:
sites/default/files/user_pictures/%username/node_images/
this will help to keep order in all user files, uploaded via other modules
is it possible or not?
Comments
Comment #1
hozt commentedThat looks like it should work. You would have to create the user_picture directory and make sure it the server can write to the directory. I am doing something similar with the %username path and it does get created when images are uploaded. I am not sure if you have node_images as another sub-directory, but it may not be needed.
Comment #2
cyc commentedMy point is I would like node images module to check if some subdirs already exists and create some if not.
E.g. for user 'admin':
If 'sites/default/files/user_pictures/admin' path doesn't exist, create it, as well as the following 'node_images' part
If 'sites/default/files/user_pictures/admin' already exists, only add 'node_images' part at the end
In both cases images should be placed in 'sites/default/files/user_pictures/admin/node_images/' subdir.
Is it possible via SMALL module code modifications?