Custom Upload Dir
[resolved] Uploading to zero folder.. (4 posts)

  1. speedypostman
    Posted 4 years 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.


  2. ulfben
    Plugin Author

    Posted 4 years ago #

    It seems the global $post_id variabel is no longer available. I'll have to update the plugin soon. Sorry for the inconvenience.

  3. kaysten
    Posted 4 years ago #

    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.

  4. ulfben
    Plugin Author

    Posted 4 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Custom Upload Dir
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic