Hello,
I added this code to the functions.php:
==============================================================
add_filter("gform_upload_path", "change_upload_path", 10, 2);
function change_upload_path($path_info, $form_id){
global $current_user;
get_currentuserinfo();
$path_info["path"] = "C:/xampp/htdocs/mysite/upload-folder/" . $current_user->user_login . "/";
$path_info["url"] = "http://localhost/mysite/upload-folder/" . $current_user->user_login . "/";
return $path_info;
}
==============================================================
when I add: custom filed -> Field Type: "file upload" and Custom Field Name: "existing" - everything works fine: files go to this folder:
http://localhost/mysite/upload-folder/admin
( where "admin" is eg. of user login).
But when I add: image -> Set as Featured Image, my files goes to this folder:
http://localhost/mysite/upload-folder
I want to send files to the same folder as in the previous case.
Any ideas?
I will be grateful for the quick response.