getting incorrect fileextension and content type
<p>I have an asp.net application where the users can upload files to our database. sometimes when they upload the files, the content-type is set as "application/octet-stream" which is a binary file. When I ask the user, they say that they uploaded the "tif" file but somehow the upload control sets it as "application/octet-stream". when I upload the same tif file from my computer it uploads with the correct content type (application/octet-stream). </p>

<p>Also, I am using the following code to get the fileextension</p>

<pre><code>fileExtension = filUpload.PostedFile.FileName.Substring(filUpload.PostedFile.FileName.LastIndexOf(".") + 1)
</code></pre>

<p>sometimes it returns the file extension as "c:\documen" or "j:\testing" etc. I know that windows doesn't allow special characters in the filename.</p>
