Skip to content

IE8 does not use the headers supplied in upload config #111

Closed
@peteorpeter

Description

@peteorpeter

If you specify headers in the upload config object, like this:

scope.fileSelected = function (file) {
  scope.upload = $upload.upload({
    method: 'POST',
    url: scope.requestResponseModel.url,
    file: file,
    headers: {
        'Content-Type': 'multipart/form-data',
        'Accept': '*/*'
     }
  })

...they are used by modern browsers. But IE8 with the flash shim always sends the same request headers regardless - it appears to be hard-coded, though I haven't dug into that yet.

In my particular case, the 'Accept: text/*' that IE8 uses in requests is causing my server to throw 406 errors because the response is configured to return the "application/json" content-type.

Thanks for the very useful module and please let me know if there's something I can do to help troubleshoot!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions