I am using the blueimp fileUpload plugin to send files to the server and in ie 8 and ie 9 it tries to prompt me to download a file. When I open the file it is perfect json.
I have tried setting the content type to text/plain as well as the dataType to text/plain but to no avail.
I am using FubuMVC as well so I cant just return a string. If it is not json then it tries to render a view.
var obj = {
dataType: 'json',
contentType: "application/json",
url: uploadUrl,
formData: formData,
start: function(e, data) {
$('#' + loadingDiv).dialog('open');
},
stop: function(e, data) {
$('#' + loadingDiv).dialog('close');
},
add: function(e, data) {
data.formData = obj.formData;
data.submit();
},
always: function(e, data) {
alert('done');
}
};
$('#' + div).fileupload(obj);