Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 5 years ago

#21868 closed task (blessed) (fixed)

Use JS Attachment models in wp.Uploader

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

Description

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 wp.media.Uploader.

Change History (2)

#1 @koopersmith
13 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.


5 years ago

Note: See TracTickets for help on using tickets.