getting the file type

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

getting the file type

dougm
Hi Dean, I mistakenly used file.ContentType thinking that it would return the file extension of the file(s) uploaded. (.xls, .pdf etc). Instead file.ContentType gave me more generic info about each file: "application/octet-stream". What is the best way to access the file type (or some would say file extension) for the file being uploaded? I'm using NeatUpload 13.13, multiFile input, Visual Studio 2008. Many Thanks, Doug
Reply | Threaded
Open this post in threaded view
|

Re: getting the file type

dougm
Hi, I got this working by using : string myFileType = file.FileName; string extention = Path.GetExtension(myFileType); Thanks, Doug