By markus on
I have got some trouble. I changed this path to... http://mywebside.com/sites/ect. - it was very stupid.
Now I see that drupal see it like this "public://http://mywebside/sites/ect." and I can't change it - drupal give me a prompt about wrong path or denied access and... no saving changes.
Please help, where I find it. Database or file?
I was looking db for 5 times and I cant see it.
Thanks
Comments
You need to add path like
You need to add path like this -
sites/default/files/Chrysanthemum.jpg
Here "Chrysanthemum.jpg" is the user's picture name. Upload images into your drupalroot\sites\default\files folder. Or you can upload picture any of the sub directory.
Please let me know if this helps you.
I know it. You wrote solution
I know it. You wrote solution to second field - default picture. I have still problem with first field - directory of uploading pictures. I changed it, but I have got this same "red prompt" - can't saving changes of denied access... In red prompt still shows this same, with this same old wrong path... I cant change it from drupal level. I want to change/erase this wrong directory from database level but I dont know where drupal saved it. With coding sha256?
I FIX IT
Topic to closed.
The solution is on http://stackoverflow.com/questions/13764529/public-public-user-pictures-...
If You can't change the path of user's pictures - need do this:
1. Go to: yourrootdirectory/modules/user
2. Edit file user.admin.inc
3. In 368 lines you need to "comment" or delete this block (backup fist the origin file!)
if (!file_prepare_directory($picture_path, FILE_CREATE_DIRECTORY)) {
form_set_error('user_picture_path', t('The directory %directory does not exist or is not writable.', array('%directory' => $picture_path)));
watchdog('file system', 'The directory %directory does not exist or is not writable.', array('%directory' => $picture_path), WATCHDOG_ERROR);
}
4. Then You can "set" another path of directory in yoursite.com/admin/config/people/accounts - without any warning or prompt.
5. Restore the origin file or delete comment.
It works!
Thx for yours concern!
By using above solution it
By using above solution it will create new directory with sites/default/files, i want to store user images in root sub directory.
Never hack core!
This is not a safe solution. Do not hack core! https://www.drupal.org/best-practices/do-not-hack-core