Join the Stack Overflow Community
Stack Overflow is a community of 6.5 million programmers, just like you, helping each other.
Join them; it only takes a minute:
Sign up

In my ionic app markup i have

<input type="file" id="file" />

in my controller i am getting the file on selection from file manager

 fileinput.addEventListener('change', function (event) {
        var file = event.target.files[0];
        console.log(file);

This works well when i upload images or videos .and also if use the file manager option from the image below . but i encounter problems when uploading audio from quick links list or if use third party browser to get the file. in most other case the File object is returned and i can upload it successfully .

enter image description here

but i am encountering two problems

1) when i use the quick links on the sidebar to upload an audio file which lists all audio files with their names .On clicking a file from this list i do not get the extension nor the content-type in the file object which i need . But the same works if i use the file manager options and navigate to the file . it's almost as if the audio quick link list just has few details and does not have extension or content-type details .

enter image description here

2) If i use the third -party explorer like ES explorer or the music app shown in sidebar of the image the App crashes and stops .

So is there any other way to navigate to a file to upload from the app or am i doing something wrong . ImagePicker cordova plugin's . limitation of just choosing images is the problem or else would have used that

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.