Hi all,
i'm going to implement a public site that will offer to the user that register a personal gallery. I use the image module but i find that i can't get a personal image folder on the server (all the files are stored in the folder you choose in filesystem settings). I have to modify the image module? other way to get personal upload folders?
I have already created a function to get the per user upload folder in image_import.module with the following code, but i think pheraps there would be a better way to go...
function _get_image_import_path() {
global $user;
$ipath_root = variable_get('image_import_path', '');
$ipath = $ipath_root . '/' . $user->uid;
if (!is_dir($ipath) && is_dir($ipath_root)) {
@mkdir($ipath_root);
@mkdir($ipath);
}
return $ipath;
}
any advice?
thanks a lot,
nelson
