Commit 81b2c7673d430329ffbddccc1bbaf60fd80ae781

Authored by Karpikau Andrei
1 parent 147e4b0a

add mime type to file upload

... ... @@ -1517,6 +1517,7 @@ var initAjaxFileUpload = function(selector){
1517 1517
1518 1518 var class_name = fileInputElem.attr('name').replace (/[\[\]]/g, '-');
1519 1519
  1520 +
1520 1521 var fileUploadItem = fileInputElem.fileupload({
1521 1522 dropZone: $('<div></div>'),
1522 1523 fileInput: fileInputElem,
... ... @@ -1543,6 +1544,11 @@ var initAjaxFileUpload = function(selector){
1543 1544
1544 1545 $('.' + class_name).find('.progress-bar').css('width', '0%');
1545 1546 },
  1547 + send: function(e, data){
  1548 + if(data.files[0].type == ''){
  1549 + data.formData['content-type'] = data.files[0].type;
  1550 + }
  1551 + },
1546 1552 done: function (e, data) {
1547 1553 submitButton.prop('disabled', false);
1548 1554
... ...
1 1 module Kanjai
2   - VERSION = "0.0.225"
  2 + VERSION = "0.0.226"
3 3 end
... ...