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
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