Issue
I'm developing a mobile application in Ionic Angular and I don't seem to be able to find a plugin that supports being able to select multiple pieces of media as well as both images and videos.
So far I've come across and tried two:
Ionic native camera
Unfortunately this plugin only has a getPicture()
method which only allows for the selection of one item (image/video).
https://ionicframework.com/docs/native/camera/
Ionic native image-picker
Unfortunately this plugin does allow for the selection of multiple items with getPictures()
yet it only selects images. This function supposedly has an option allow_video: true
in its invocation parameters but I've tried this out yet videos don't show up in the gallery. There's also an open github issue since 2017 about this with no response.
https://github.com/Telerik-Verified-Plugins/ImagePicker
My question here is, does anyone know of an Ionic plugin that would allow me to open the gallery and allow the user to select multiple pieces of media - both images and video? The returned result would preferably be a file URI for each selected item but that is not a necessity.
Thanks in advance!
Solution
Multiple files with the ionic plugin I am also unable to find but you can use Html file tag to get the desired type of files.
HTML code
<input type="file" multiple name="files[]">
TS code
files: FileList;
public testup(event){ files=event.target.files;}
Answered By - Neha Shah
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.