How to verify file type? (JPG)
How you can verify the file types? For example if the file introduced to your application has the .JPG extention how can you decide if it is really a jpg file or just has jpg extension. I guess it will be a hard task because of lots of file types available, so i just need to know about JPGs.
Thanks.
Re: How to verify file type? (JPG)
Quote:
Originally posted by Lunatic3
How you can verify the file types? For example if the file introduced to your application has the .JPG extention how can you decide if it is really a jpg file or just has jpg extension. I guess it will be a hard task because of lots of file types available, so i just need to know about JPGs.
Thanks.
what is your exact problem? Are you retrieving a .JPG file from the web, but a html file is being downloaded instead? (you can verify it by changing the extension and opening it with notepad.) If this is in deed your problem, just change the file type to .txt, then open the file using a text reader. If works, then it wasn't a jpg.