[wp-trac] [WordPress Trac] #24403: Bug - uploadedTo argument for wp.media

WordPress Trac noreply at wordpress.org
Thu May 23 20:27:43 UTC 2013


#24403: Bug - uploadedTo argument for wp.media
---------------------------+-----------------------------
 Reporter:  jamesmehorter  |      Owner:
     Type:  defect (bug)   |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  Media          |    Version:  3.5.1
 Severity:  normal         |   Keywords:
---------------------------+-----------------------------
 Adding a 'uploadedTo' value for wp.media causes files uploaded in the
 current frame to not display in the library frame, see attached
 screenshot. It appears the 'library' state is not updating. The screenshot
 was taken immediately after dropping an image onto the frame to be
 uploaded.

 Expectation: After dropping a new upload onto the frame, you should see
 the uploaded file with the currently uploaded files and it should
 automatically be selected (the exact behavior that is shown without the
 'uploadedTo' argument)

 Code to reproduce:

 {{{
 <script>
         (function($){
                 my_frame = wp.media({
                         title: 'Select Your Images',
                         button: {
                                 text: 'Choose'
                         },
                         multiple: true,
                         library: {
                                 type: 'image',
                                 uploadedTo: some_post_id  //Only display
 attachments for current post in the 'Library' state
                         }
                 });

                 my_frame.open();
         })(jQuery);
 </script>
 }}}

--
Ticket URL: <http://core.trac.wordpress.org/ticket/24403>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list