473,382 Members | 1,349 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

File Upload: *.CSV

When I upload CSV files to my development computer from my development
computer the content type is displayed as Output 1. However, if I
upload from another computer on my network using the EXACT same file,
I get Output 2. Can anyone tell me why that is? I just want to check
to see if the file being uploaded is of type CSV. I want this to work
from any computer on the network.
===========Code Snippet===========
HttpPostedFile file = UploadBox.PostedFile;
Response.Write(file.ContentType);
================================
============Output 1==============
application/vnd.ms-excel
================================
============Output 2==============
application/vnd.ms-excel
================================
Thank you,
King

Jul 17 '07 #1
3 2760
Hi,

"King" <ki*******@gmail.comwrote in message
news:11**********************@o11g2000prd.googlegr oups.com...
When I upload CSV files to my development computer from my development
computer the content type is displayed as Output 1. However, if I
upload from another computer on my network using the EXACT same file,
I get Output 2. Can anyone tell me why that is? I just want to check
to see if the file being uploaded is of type CSV. I want this to work
from any computer on the network.
===========Code Snippet===========
HttpPostedFile file = UploadBox.PostedFile;
Response.Write(file.ContentType);
================================
============Output 1==============
application/vnd.ms-excel
================================
============Output 2==============
application/vnd.ms-excel
================================
They look the same to me, but even if they are different (one read like
text/plaintext) it does not matter, the answer you get is dependand of
either the configuration of IIS or the default program that is registered in
the system to handle a file with that extension.
Why are you so worried about it?
Jul 17 '07 #2
King,

Both the output is same. Can you explain the problem again?

Kalpesh

On Jul 17, 9:15 am, King <kingky...@gmail.comwrote:
When I upload CSV files to my development computer from my development
computer the content type is displayed as Output 1. However, if I
upload from another computer on my network using the EXACT same file,
I get Output 2. Can anyone tell me why that is? I just want to check
to see if the file being uploaded is of type CSV. I want this to work
from any computer on the network.

===========Code Snippet===========
HttpPostedFile file = UploadBox.PostedFile;
Response.Write(file.ContentType);
================================

============Output 1==============
application/vnd.ms-excel
================================

============Output 2==============
application/vnd.ms-excel
================================

Thank you,
King

Jul 18 '07 #3
Ehm, I'm not sure I see what's the problem. Both outputs look
identical to me. Isn't that what's supposed to happen?

Regards,
Bram
When I upload CSV files to my development computer from my development
computer the content type is displayed as Output 1. However, if I
upload from another computer on my network using the EXACT same file,
I get Output 2. Can anyone tell me why that is? I just want to check
to see if the file being uploaded is of type CSV. I want this to work
from any computer on the network.

===========Code Snippet===========
HttpPostedFile file = UploadBox.PostedFile;
Response.Write(file.ContentType);
================================

============Output 1==============
application/vnd.ms-excel
================================

============Output 2==============
application/vnd.ms-excel
================================

Thank you,
King

Jul 18 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Tihon | last post by:
Hello! I again need your help, just can't understand whats going on. Got this upload pictures form and it's having problem handling large files (~1.5 - 2 MB). Everything works fine if i just...
15
by: Simon | last post by:
I would like to create a very basic file upload add image form to add to my web site and to keep them in a "tmp" directory within my web hosting file manager once uploaded. I understand the basic...
2
by: matt | last post by:
I have compiled some code, some written by me, some compiled from various sources online, and basically i've got a very simple flat file photo gallery. An upload form, to upload the photos and give...
13
by: Sky Sigal | last post by:
I have created an IHttpHandler that waits for uploads as attachments for a webmail interface, and saves it to a directory that is defined in config.xml. My question is the following: assuming...
2
by: mark | last post by:
How do I detect that a particular form element is a file upload or if the file upload has worked? In the Python cgi module documentation I found suggested code... form = cgi.FieldStorage()...
7
by: pbd22 | last post by:
hi. i am having probs understanding how to grab a file being uploaded from a remote client. i am using hidden input fields for upload such as: <input id="my_file_element" type="file"...
2
by: hotflash | last post by:
Hi All, I found the best pure ASP code to upload a file to either server and/or MS Access Database. It works fine for me however, there is one thing that I don't like and have tried to fix but...
1
by: chrisj | last post by:
I'm using freeASPupload and got some assistance integrating to a Member script. It works successfully. In this modified version there are two groups that use this upload script. Members of one...
6
Jacotheron
by: Jacotheron | last post by:
I need a PHP script that can upload music files (mp3). The script is for a home project I have started a while ago. I have a MySQL database of all the music that I have. Other computers on the...
7
Curtis Rutland
by: Curtis Rutland | last post by:
Building A Silverlight (2.0) Multi-File Uploader All source code is C#. VB.NET source is coming soon. Note: This project requires Visual Studio 2008 SP1 or Visual Web Developer 2008 SP1 and...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.