views:

53

answers:

1

I have a asp.net vb.net app, with a upload file control, when i upload the file i can get the type of file the extension : .(extension), But if the user change the extension how i can get the real type of file?

Any ideas??

+1  A: 

You should analyse the header contents of the uploaded data.

Raj
Does vb.net provide any object for this problem.Thanx
Haroldis
there is no built in functionality in vb.net. I haven't found any libraries to do this automatically.here how todo it manually with an mp3 filehttp://www.devhood.com/tutorials/tutorial_details.aspx?tutorial_id=79mp3 file format specificationhttp://www.mpgedit.org/mpgedit/mpeg_format/MP3Format.htmlothers are out for checking imageshttp://stackoverflow.com/questions/210650/validate-image-from-file-in-c
SQueek