Skip to content

Commit 8cecad3

Browse files
committed
MOBILE-1982 upload: Allow getting videos in upload album
1 parent 5a22fec commit 8cecad3

File tree

1 file changed

+4
-0
lines changed
  • www/core/components/fileuploader/services

1 file changed

+4
-0
lines changed

www/core/components/fileuploader/services/helper.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,10 @@ angular.module('mm.core.fileuploader')
404404
options.sourceType = navigator.camera.PictureSourceType.PHOTOLIBRARY;
405405
options.popoverOptions = new CameraPopoverOptions(10, 10, $window.innerWidth - 200, $window.innerHeight - 200,
406406
Camera.PopoverArrowDirection.ARROW_ANY);
407+
if (ionic.Platform.isIOS()) {
408+
// Only get all media in iOS because in Android using this option allows uploading any kind of file.
409+
options.mediaType = Camera.MediaType.ALLMEDIA;
410+
}
407411
}
408412

409413
return $cordovaCamera.getPicture(options).then(function(path) {

0 commit comments

Comments
 (0)