|
-
Dec 1st, 2010, 05:48 AM
#1
[RESOLVED] MIME Type / ContentType problem
I have a webpage that has FileUpload control to upload files to server. The FileUpload.ContentType is also saved in database and later used in other procedures.
Now I need an equivalent functionality in my webservice. I get the files from user in byte array. But how should I determine the content type?
I tried using the urlmon.dll. But the results for FileUpload.ContentType and the urlmon.dll are different. The FindMimeFromData of urlmon.dll and FileUpload.ContentType return different values for same file.
e.g. For a .csv file, FindMimeFromData returns "text/plain" while the FileUpload ContentType returns "application/vnd.ms-excel".
Anyone knows of any way to get the same ContentType that is returned from asp.net FileUpload control?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|