How to get file type in mobile app?

How to get file type in mobile app?

  

Hi,

I need file type of uploaded file in mobile app,

In web there is type property of upload control but in mobile I did not find any type property of upload control. Is there any component for that or any other solution?


Regards,

Gopal

Hi Gopal,

That has recently been asked by someone else, and the consensus seems to be that you can't.

Solution

Hi Gopal,

Yup, as Kilian mentioned, there's not consensus about it.

This is what I usually do, but it's not heavily tested.

On the IsImage if condition, it's something like extension = "jpg" or extension="jpeg" or extension="png"  

I guess it's not a production code, but it does the trick.

Cheers

Solution

Henrique Batista wrote:

Hi Gopal,

Yup, as Kilian mentioned, there's not consensus about it.

This is what I usually do, but it's not heavily tested.

On the IsImage if condition, it's something like extension = "jpg" or extension="jpeg" or extension="png"  

I guess it's not a production code, but it does the trick.

Cheers

Thank you guise, 

It is not exactly what I want but It will help me to achieve my goal :)