Skip to content
This repository was archived by the owner on May 25, 2023. It is now read-only.

Add X-Requested-With: IFrame to iframe transport #3291

Conversation

felixbuenemann
Copy link

This patch adds a parameter X-Requested-With=IFrame to file uploads via the iframe transport.

The patch is taken from the jquery-fileupload-rails gem, which uses the header to detect iframe transport uploads in server middleware. Having this upstream would allow to separate the rails middleware from the js library which would make upgrading the assets much easier.

This is ported from the jquery-fileupload-rails gem, which uses the
header to detect iframe transport uploads in server middleware.
@blueimp
Copy link
Owner

blueimp commented Aug 8, 2014

Thanks for your contribution.
However, it's already possible to distinguish XHR and Iframe based uploads based on the standard HTTP Accept header field, as explained here:
https://github.com/blueimp/jQuery-File-Upload/wiki/Setup#content-type-negotiation

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants