[wp-trac] [WordPress Trac] #16777: media_sideload_image() doesn't upload in past "/year/month/" folders
WordPress Trac
wp-trac at lists.automattic.com
Sun Mar 6 15:42:46 UTC 2011
#16777: media_sideload_image() doesn't upload in past "/year/month/" folders
--------------------------+-----------------------------
Reporter: Coolkevman | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Upload | Version: 3.1
Severity: normal | Keywords:
--------------------------+-----------------------------
When using the {{{media_sideload_image()}}} method to upload a remote
image, you can specify as a second parameter the ID of post to which this
image belongs.
The upload process works great and the new uploaded image is well attached
to the post we specify.
Now if the post is already published in the past (say April 1st, 2009),
the image is uploaded to the {{{/wp-content/uploads/2011/03/}}} folder
(which is the current month and the current year). The problem is that we
expect the image to be uploaded to {{{/wp-content/uploads/2009/04/}}}
instead.
I expect {{{media_sideload_image()}}} to use the post's publishing month
and year as this is the default behavior when you use the administration
interface to upload content in an already published post.
This was consistently reproduced on the latest WordPress 3.1 (and its
RCs).
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16777>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list