sundaysloth
sundaysloth

Reputation: 81

How to add request headers when uploading a file using iframe?

My form should upload a file and it should work with older versions of IE. That's why I use a hidden iframe. The thing is that I need to add a couple of headers to the request as they are required by the 3rd party API that I'm using. How to set the request headers when using an iframe?

Upvotes: 0

Views: 147

Answers (1)

Quentin
Quentin

Reputation: 943563

You cannot.

XMLHttpRequest is the only API which browsers provide that allows that setting of HTTP headers from JavaScript.

Upvotes: 1

Related Questions