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