Using C# how can I test a file is a jpeg? Should I check for a .jpg extension?
Thanks
Just take the media type of file and verify:
private bool isJpeg() { string p = currFile.Headers.ContentType.MediaType; return p.ToLower().Equals("image/jpeg") || p.ToLower().Equals("image/pjpeg") || p.ToLower().Equals("image/png"); }