WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#6613 closed defect (bug) (duplicate)

Uploader: return an ID not HTML from async-upload

Reported by: tellyworth Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:

Description

Currently, async-upload.php returns a big chunk of HTML on a successful upload, containing the form for filling in the title, caption etc. It runs to around 4800 bytes.

I've run into a situation where (for reasons unclear) ajax responses are truncated to about 2.5kb. The enclosed patch changes async-upload.php to fix this: instead of HTML it returns the attachment ID only on a successful upload. The HTML form is fetched in a separate ajax request. The result is the same, and -- truncation aside -- I think this is a slightly more elegant and maintainable approach.

Attachments (1)

plan-b-r7601.patch (2.8 KB) - added by tellyworth 7 years ago.

Download all attachments as: .zip

Change History (4)

@tellyworth7 years ago

comment:1 @tellyworth7 years ago

This has a bug. Working on it.

comment:2 @tellyworth7 years ago

  • Milestone changed from 2.6 to 2.5.1
  • Resolution set to duplicate
  • Status changed from new to closed

I've created a new ticket with a better explanation of the problem. It's a serious bug that needs fixing in 2.5.1.

See #6713.

comment:3 @Nazgul7 years ago

  • Milestone 2.5.1 deleted
Note: See TracTickets for help on using tickets.