Opened 11 years ago
Closed 10 years ago
#24403 closed enhancement (worksforme)
Bug - uploadedTo argument for wp.media
Reported by: | jamesmehorter | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.5.1 |
Component: | Media | Keywords: | close |
Focuses: | multisite | Cc: |
Description
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>
Attachments (1)
Change History (5)
Note: See
TracTickets for help on using
tickets.
This is the view seen immediately after uploading an image by dropping it onto the frame