I have used class File.extension to know the extension of the file like:
if (f.extension == "jpg" || f.extension == "jpeg") {
//image
}
It works for me.
Question
I need to know if a input file is a Video, Audio or a Image file.
Some of the audio files contains an video stream and a audio stream, so, I can't check the streams to know if it's a video or a audio.
Is there any way to know that? Thanks.
La solution
I have used class File.extension to know the extension of the file like:
if (f.extension == "jpg" || f.extension == "jpeg") {
//image
}
It works for me.