Skip to content

Commit

Permalink
Merge pull request comfy#200 from derek-watson/master
Browse files Browse the repository at this point in the history
Fixed AJAX uploads in Chrome and newer Firefox
  • Loading branch information
GBH committed Jul 10, 2012
2 parents 256a701 + 000b933 commit 55b1d7a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ $.CMS = function(){
xhr.open('POST', action, true);
xhr.setRequestHeader('Accept', 'application/javascript');
xhr.setRequestHeader('X-CSRF-Token', $('meta[name=csrf-token]').attr('content'));
xhr.setRequestHeader('Content-Type', file.content_type);
xhr.setRequestHeader('Content-Type', file.content_type || file.type);
xhr.setRequestHeader('X-File-Name', file.name);
xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
xhr.send(file);
Expand All @@ -220,4 +220,4 @@ $.CMS = function(){
});
}
}
}();
}();

0 comments on commit 55b1d7a

Please sign in to comment.