Ticket #2532248 (closed enhancement)

Reporter


John Mizliso
Opened: 05/3/12
Last modified: 08/1/12
Status: closed
Type: enhancement
Resolution: fixed

Owner


Allen Rabinovich
Target Release: 3.6.0
Priority: P3 (normal)
Summary: Set a XMLHttpRequest header in the request header.
Description:

I am using uploader in a progressive enhancement scenario.

Normally a file input and a submit button is displayed. This is then hidden and replaced by the uploader's buttons. Normally, without javascript, the page will refresh and be rerendered. However, with
the uploader, depending on the upload, I would just like to send back a simple JSON response.

Normally, with Y.IO, I can check if XMLHttpRequest is the value of the X-Requested-With header to determine if it's an AJAX request. With Uploader, however, the X-Requested-With is not set, which
results in a not so neat solution:

Setting an extra POST variable, for example, called "isAJAX", and then check that on the server side.

It would be much neater if the X-Requested-With header is set, so that we can determine if the request is "AJAX" or just an ordinary request.

Type: enhancement Observed in Version: 3.5.0
Component: Uploader Severity: S3 (normal)
Assigned To: Allen Rabinovich Target Release: 3.6.0
Location: Priority: P3 (normal)
Tags: uploader, header Relates To:
Browsers: N/A
URL:
Test Information:

Change History

Allen Rabinovich

YUI Developer

Posted: 05/8/12
  • milestone changed to 3.6.0
  • priority changed to P3 (normal)
  • status changed from new to accepted

There will be pass-through controls for various XHR features in 3.6.0 Uploader. Thanks for suggesting this.

Allen Rabinovich

YUI Developer

Posted: 05/8/12
  • estimated changed from 0 to 0.5
  • sprint changed to sprint 2

Allen Rabinovich

YUI Developer

Posted: 06/9/12
  • completed changed from 0.25 to 0.75
  • remaining changed from 0.25 to 0
  • status changed from accepted to checkedin

There's now an uploadHeaders attribute on the Uploader, which allows you to set necessary HTTP headers on the XHR object.

Jenny Donnelly

YUI Developer

Posted: 08/1/12
  • resolution changed to fixed
  • status changed from checkedin to closed

Shipped in 3.6.0. Marking closed/fixed.