Opened 11 years ago
Closed 8 years ago
#10190 closed feature (migrated)
"upload" property of the XMLHttpRequest
Reported by: | 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 (last modified by )
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.
Change History (17)
comment:1 Changed 11 years ago by
Cc: | jaubourg added |
---|---|
Component: | unfiled → ajax |
Priority: | undecided → low |
Type: | feature → enhancement |
comment:2 Changed 11 years ago by
Milestone: | None → 1.next |
---|---|
Status: | new → open |
comment:3 Changed 11 years ago by
Priority: | low → high |
---|
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.
comment:4 Changed 11 years ago by
Keywords: | 1.8-discuss added |
---|
comment:5 Changed 11 years ago by
Description: | modified (diff) |
---|
-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.
comment:6 Changed 11 years ago by
+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)
comment:7 Changed 11 years ago by
Description: | modified (diff) |
---|
+1, I'd like a better/simpler way to do this as well
comment:12 Changed 10 years ago by
Type: | enhancement → feature |
---|
Bulk change from enhancement to feature.
comment:13 Changed 10 years ago by
Keywords: | needsdocs added |
---|
comment:16 Changed 9 years ago by
Milestone: | 1.next → 1.next/2.next |
---|
comment:17 Changed 9 years ago by
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
.
comment:18 Changed 8 years ago by
Resolution: | → migrated |
---|---|
Status: | open → closed |
Migrated to https://github.com/jquery/jquery/issues/1730
Marking as valid for 1.next