0

I have a text file stored as image (any extension) by renaming it in explorer. I need to get the original type of file on uploading it using input(type=file). Any possibilities? Thanks in advance.

ASP.NET 2.0 Jquery 3.2.1

  • You have a .txt file stored as a .jpg/.bmp and you want to stream it in c# as a text file on upload? – Zee Mar 15 '22 at 04:45
  • I just want to detect whether it is a valid image file and to know its actual extension. It could be done preferably in jquery (client side). If not, then in server-side (vb.net) Thanks – user2219130 Mar 15 '22 at 04:47
  • Check this post https://stackoverflow.com/a/670549/6048531 They check the headers and determine the file type. – Zee Mar 15 '22 at 04:48

0 Answers0