Make WordPress Core

Opened 10 years ago

Closed 9 years ago

#24403 closed enhancement (worksforme)

Bug - uploadedTo argument for

Reported by: jamesmehorter's profile jamesmehorter Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.5.1
Component: Media Keywords: close
Focuses: multisite Cc:


Adding a 'uploadedTo' value for 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:

		my_frame ={
			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

Attachments (1) frame library state not updating.png (119.9 KB) - added by jamesmehorter 10 years ago.
This is the view seen immediately after uploading an image by dropping it onto the frame

Download all attachments as: .zip

Change History (5)

10 years ago

This is the view seen immediately after uploading an image by dropping it onto the frame

#1 @nacin
10 years ago

  • Cc koopersmith added

#3 @ericlewis
9 years ago

  • Focuses multisite added
  • Keywords close added
  • Type changed from defect (bug) to enhancement

Related to #26587 ( library argument post_ _not_in breaks the uploads), see comment 2.

This isn't the proper way to interact with the API for this purpose.

#4 @wonderboymusic
9 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed

This works now. There has been so much churn in the past year and a half, I am not sure what the exact fix was.

Note: See TracTickets for help on using tickets.