Skip to main content

Bug Tracker

Side navigation

#10190 closed feature (migrated)

Opened September 02, 2011 05:40AM UTC

Closed October 20, 2014 11:35PM UTC

"upload" property of the XMLHttpRequest

Reported by: superbulldeng@gmail.com Owned by:
Priority: high Milestone: 1.next/2.next
Component: ajax Version: 1.6.3
Keywords: 1.8-discuss Cc: jaubourg
Blocked by: Blocking:
Description

There is a "upload" property in the xhr object returned by new XMLHttpRequest() in supported browser.

But the object returned by $.ajax() seems didn't contain this property.

This property is important to get the state of file upload progress.

Attachments (0)
Change History (17)

Changed September 02, 2011 06:41AM UTC by addyosmani comment:1

cc: → jaubourg
component: unfiledajax
priority: undecidedlow
type: featureenhancement

Changed September 21, 2011 12:33AM UTC by timmywil comment:2

milestone: None1.next
status: newopen

Marking as valid for 1.next

Changed November 22, 2011 02:13AM UTC by malsup comment:3

priority: lowhigh

This is really a fairly significant omission. As stated above, it's impossible to track FormData file upload progress without this property exposed. The jqXHR object is documented as a "superset of the browser's native XMLHttpRequest object". The upload property is but one example where this is simply not true, with respect to XMLHttpRequest Level 2. Either all properties should be exposed or there must be a way to access to the native XHR.

Changed November 22, 2011 02:46AM UTC by ajpiano comment:4

keywords: → 1.8-discuss

Changed December 13, 2011 04:09PM UTC by jaubourg comment:5

description: There is a "'''upload'''" property in the xhr object returned by new XMLHttpRequest() in supported browser. \ But the object returned by $.ajax() seems didn't contain this property. \ This property is important to get the state of file upload progress.There is a "'''upload'''" property in the xhr object returned by new XMLHttpRequest() in supported browser.\ But the object returned by $.ajax() seems didn't contain this property.\ This property is important to get the state of file upload progress.

-1, There are ways to access the native xhr (by overriding options.xhr in a prefilter). If we want upload in jQuery, then we'd better implement an upload method rather than try and have ajax be even more bloated.

Changed December 13, 2011 05:14PM UTC by jzaefferer comment:6

+1, "overriding options.xhr in a prefilter" is not good enough - at least document how to access non-exposed properties in a sane way as part of the existing docs (see also Mike's comment)

Changed December 13, 2011 06:28PM UTC by dmethvin comment:7

description: There is a "'''upload'''" property in the xhr object returned by new XMLHttpRequest() in supported browser.\ But the object returned by $.ajax() seems didn't contain this property.\ This property is important to get the state of file upload progress.There is a "'''upload'''" property in the xhr object returned by new XMLHttpRequest() in supported browser. \ But the object returned by $.ajax() seems didn't contain this property. \ This property is important to get the state of file upload progress.

+1, I'd like a better/simpler way to do this as well

Changed December 14, 2011 12:55AM UTC by mikesherov comment:8

description: There is a "'''upload'''" property in the xhr object returned by new XMLHttpRequest() in supported browser. \ But the object returned by $.ajax() seems didn't contain this property. \ This property is important to get the state of file upload progress.There is a "'''upload'''" property in the xhr object returned by new XMLHttpRequest() in supported browser.\ But the object returned by $.ajax() seems didn't contain this property.\ This property is important to get the state of file upload progress.

+1

Changed December 14, 2011 04:06PM UTC by timmywil comment:9

+1

Changed December 19, 2011 05:26PM UTC by rwaldron comment:10

description: There is a "'''upload'''" property in the xhr object returned by new XMLHttpRequest() in supported browser.\ But the object returned by $.ajax() seems didn't contain this property.\ This property is important to get the state of file upload progress.There is a "'''upload'''" property in the xhr object returned by new XMLHttpRequest() in supported browser. \ But the object returned by $.ajax() seems didn't contain this property. \ This property is important to get the state of file upload progress.

-1, Ajax is extendable.

Changed September 09, 2012 01:10AM UTC by dmethvin comment:11

type: enhancementfeature

Bulk change from enhancement to feature.

Changed October 15, 2012 10:57PM UTC by timmywil comment:12

keywords: 1.8-discuss1.8-discuss, needsdocs

Changed October 16, 2012 12:16AM UTC by mikesherov comment:13

keywords: 1.8-discuss, needsdocs1.8-discuss

F you, Timmy

Changed June 11, 2013 01:37PM UTC by meleyal comment:14

It seems you can access the xhr object in $.ajaxSettings.xhr();

Changed September 16, 2013 08:53PM UTC by m_gol comment:15

milestone: 1.next1.next/2.next

Changed March 01, 2014 10:03PM UTC by dmethvin comment:16

I'm switching to -1 on this as far as $.ajax is concerned, since any addition we make here would not be cross-browser in either branch. I'd prefer to deal with this in $.xhr.

Changed October 20, 2014 11:35PM UTC by m_gol comment:17

resolution: → migrated
status: openclosed