Browse Source

fix for #837

master
Jovan Gerodetti 10 years ago
parent
commit
c2ff35769c
  1. 6
      app/js/services.js

6
app/js/services.js

@ -1583,12 +1583,12 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) @@ -1583,12 +1583,12 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
} else if (['image/jpeg', 'image/png', 'image/bmp'].indexOf(file.type) >= 0) {
attachType = 'photo';
apiFileName = 'photo.' + file.type.split('/')[1];
} else if (file.type.substr(0, 6) == 'audio/' || ['video/ogg'].indexOf(file.type) >= 0) {
attachType = 'audio';
apiFileName = 'audio.' + (file.type.split('/')[1] == 'ogg' ? 'ogg' : 'mp3');
} else if (file.type.substr(0, 6) == 'video/') {
attachType = 'video';
apiFileName = 'video.mp4';
} else if (file.type.substr(0, 6) == 'audio/') {
attachType = 'audio';
apiFileName = 'audio.' + (file.type.split('/')[1] == 'ogg' ? 'ogg' : 'mp3');
} else {
attachType = 'document';
apiFileName = 'document.' + file.type.split('/')[1];

Loading…
Cancel
Save