File Upload: *.CSV

K

King

Hello,

I would like to check to see if the file that I am uploading to my
server is of type CSV. I am currently doing that with the following
snippet:

HttpPostedFile file = UploadBox.PostedFile;
if (file.ContentType.Equals("application/vnd.excel"))
{
do stuff;
}

This works when uploading the file from my development computer to my
development computer. However, when I try this from another computer
on my network, it doesn't work. I used:

Response.Write(file.ContentType);

Uploading from my development computer I got:

application/vnd.excel

Uploading from my other computer on the network I got:

application/octet-stream

I don't understand why this is happening. They are the EXACT same
file as I am uploading it from a network drive.


Thank you,
King
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top