Support » Plugin: Custom Upload Dir » Problem with Uploading to Drafts [solved]

  • Resolved hommealone


    It seems this plugin is no longer supported; but if anyone has this same problem, I hope this might be helpful.

    I had a problem inserting image files into posts that had “Draft” status. Even if I had properly named and published the post before uploading images, as required, if I then set the post status to Draft, and then tried to insert images, the images would not be accessible in the Media Library. In the Media Library and in the “Insert Media” dialog, the thumbnails of those images just showed as gray squares.

    I found the problem: in the plugin settings page, I had this set up in the “Build a path template” field:

    This worked fine for published posts, making a path of, for example:

    But when in draft status, it would put them into a different folder, like this, instead:

    That broke everything.

    I had to substitute %postname% instead of %permalink% in the path template as:

    This solved the problem. Do not use %permalink% in your path template, or you will not be able to add images into posts with draft status!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author ulfben


    Thanks. Thats actually expected behaviour – drafts don’t have a permalink.

    And the plugin is still supported, I just can’t be bothered to increment numbers in all my plugins every time WordPress release a new version. I actively use this plugin on half a dozen sites. It’s hasn’t required any updates for a couple of years, but if it ever breaks I’d be the first to know.

    Thread Starter hommealone


    Thanks @ulfben

    Great to know that this terrific plugin is not abandoned. Thank you very much for making this available. It solves a problem in a very sane and logical manner. (Maybe you could update the plugin every year or two even if it doesn’t need it, just to avoid the “This plugin may no longer be supported…” warning, which scares off potential users. It made me wonder if the problem that I was having was due to the plugin having gone “stale”.)

    I see why the behavior I noted would be expected. I wanted to post this since it is not in the documentation. Next time that you DO update this plugin, you might consider putting a note on the plugin options page advising that including %permalink% in the path template will have unexpected results – not being able to upload to draft posts. In fact, I can’t really imagine why someone would ever choose %permalink% knowing that it breaks the Draft functionality; maybe that should not even be one of the choices.

    Thanks again for this plugin!

    Plugin Author ulfben


    yeah. I dont remember who requested that feature and dont think it’s very popular. a warning certainly makes sense.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Problem with Uploading to Drafts [solved]’ is closed to new replies.