speedypostman
Member
Posted 1 year ago #
I love your plugin. Thank you for your hard work.
I am having a problem when uploading files (not just JPG) where the file uploads to a "zero" folder (ie. wp-content/uploads/0).
Any thoughts? I get this result regardless of which variable I choose.
Any insight would be greatly appreciated.
http://wordpress.org/extend/plugins/custom-upload-dir/
It seems the global $post_id variabel is no longer available. I'll have to update the plugin soon. Sorry for the inconvenience.
Not sure if this helps but I was having an issue where nothing was being uploaded to the folder I directed by username. I looked at the code and noticed that they are returning the wrong variable.
function cud_get_author_name($author_id){
$curuser = get_userdata($author_id);
return sanitize_title($author->user_nicename);//->display_name
}
Changing $author in the return sanitize_title function to $curuser fixed my issue.
This is on line 122 in file custom-upload-dir.php in wp-content/plugins/custom-upload-dir/ folder.
Thanks. This has been fixed in the latest version. I would appreciate it if you tried the current development version though, as it has many improvements.