I’m using jQuery File Upload with Ruby on Rails 3
$(".jquery-upload").fileupload({
url: "/photos",
type: "POST",
dataType: "script" });
Works as supposed in Chrome and other browsers, but IE sends the request as HTML rather than JS:
Started POST "/photos"
Processing by PhotosController#create as HTML
Changing “url” to “/photos.js” to force JS format resulted in IE prompting to download the returned JS instead of processing it.
How can I make IE request “script” and process it as JS?
Your problem answer seems to be explained in your plugin’s documentation : https://github.com/blueimp/jQuery-File-Upload/wiki/Setup
Look at the
Content-Type Negotiationparagraph.