Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 21 months ago

#21868 closed task (blessed) (fixed)

Use JS Attachment models in wp.Uploader

Reported by: koopersmith Owned by: koopersmith
Milestone: 3.5 Priority: normal
Severity: normal Version: 3.5
Component: Media Keywords:
Focuses: Cc:


Currently, wp.Uploader returns a JSON object that was a precursor to the new JS attachment models. Given the introduction of the new media JS APIs and the internal nature of wp.Uploader in 3.4, we should update the API to work with the new media conventions.

wp.Uploader should probably also be aliased to

Change History (2)

#1 @koopersmith
9 years ago

  • Owner set to koopersmith
  • Resolution set to fixed
  • Status changed from new to closed

In [21814]:

Use JS Attachment models in wp.Uploader. fixes #21868.

Moves the uploading Attachments queue from the media workspace view to the uploader itself. This ensures that all attachments are added to the central attachmnet store.

Updates wp.Uploader to pass Attachment models to callbacks instead of Plupload file objects. Attachments in the process of uploading have a reference to the file object (which can be fetched by calling attachment.get('file');).

Also updates the customizer to be compatible with the API changes.

This ticket was mentioned in Slack in #core-editor by poena. View the logs.

21 months ago

Note: See TracTickets for help on using tickets.