Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 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:


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 10 years ago.

Download all attachments as: .zip

Change History (4)

#1 @tellyworth
10 years ago

This has a bug. Working on it.

#2 @tellyworth
10 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.

#3 @Nazgul
10 years ago

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