Title: [Plugin: Custom Upload Dir] Uploading to zero folder..
Last modified: August 19, 2016

---

# [Plugin: Custom Upload Dir] Uploading to zero folder..

 *  Resolved [speedypostman](https://wordpress.org/support/users/speedypostman/)
 * (@speedypostman)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-custom-upload-dir-uploading-to-zero-folder/)
 * 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/](http://wordpress.org/extend/plugins/custom-upload-dir/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [ulfben](https://wordpress.org/support/users/ulfben/)
 * (@ulfben)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-custom-upload-dir-uploading-to-zero-folder/#post-1891266)
 * It seems the global $post_id variabel is no longer available. I’ll have to update
   the plugin soon. Sorry for the inconvenience.
 *  [kaysten](https://wordpress.org/support/users/kaysten/)
 * (@kaysten)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/plugin-custom-upload-dir-uploading-to-zero-folder/#post-1891430)
 * 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.
 *  Plugin Author [ulfben](https://wordpress.org/support/users/ulfben/)
 * (@ulfben)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/plugin-custom-upload-dir-uploading-to-zero-folder/#post-1891442)
 * Thanks. This has been fixed in the latest version. I would appreciate it if you
   tried [the current development version](http://wordpress.org/extend/plugins/custom-upload-dir/download/)
   though, as it has many improvements.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘[Plugin: Custom Upload Dir] Uploading to zero folder..’ is closed to 
new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/custom-upload-dir.svg)
 * [Custom Upload Dir](https://wordpress.org/plugins/custom-upload-dir/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-upload-dir/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-upload-dir/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-upload-dir/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-upload-dir/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-upload-dir/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [ulfben](https://wordpress.org/support/users/ulfben/)
 * Last activity: [14 years, 9 months ago](https://wordpress.org/support/topic/plugin-custom-upload-dir-uploading-to-zero-folder/#post-1891442)
 * Status: resolved