[wp-trac] [WordPress Trac] #6613: Uploader: return an ID not HTML
from async-upload
WordPress Trac
wp-trac at lists.automattic.com
Sun Apr 6 12:09:47 GMT 2008
#6613: Uploader: return an ID not HTML from async-upload
------------------------+---------------------------------------------------
Reporter: tellyworth | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 2.6
Component: General | Version:
Severity: normal | Keywords:
------------------------+---------------------------------------------------
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.
--
Ticket URL: <http://trac.wordpress.org/ticket/6613>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list