473,509 Members | 3,032 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Evaluate contenttype

Does anyone know what really happens when you call the method contenttype on
the object httpPostedFile that returns the mime-type for the uploaded file.

Is it so that the post request includes the mimetype as a string that has
benn evaluated in the client and is attached to the post to the server
Or is it the webserver that extracts the file extension from the posted
file and looks it up in it´s own registry?

The reason for this is that i want to remodel an old function that used a
file post and instead use a web service request that takes the arguments
filename, bytearray and so on. But i am wondering about the best way to
evaluate the files mimetype. Clientside or serverside.

Regards
John Boghossian

Nov 18 '05 #1
6 1202
Hi John,

Thank you for posting to the MSDN newsgroups.

I am interested in this issue and researching on it now. I will update you
as soon as possible.

Best regards,

Jacob Yang
Microsoft Online Partner Support
Get Secure! ¨C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 18 '05 #2
Hi there Jacob,

I am most greatful for your interest in this matter. The solution i am
envisioning is an clientside-control that will allow drag and drop from the
filesystem and possibly from outlook/exchange to automatically upload a
document to the server when a user drops a file on the control. The control
will be used in an assignment tracking system for our business intelligence
dept.

The system is an intranet solution so the environment is controlled so i
don´t have to care about other browsers that the IE -standard we use.

I am looking forward to hear from you.

Best regards
John Boghossian

"Jacob Yang [MSFT]" <ji***@online.microsoft.com> wrote in message
news:pL**************@cpmsftngxa06.phx.gbl...
Hi John,

Thank you for posting to the MSDN newsgroups.

I am interested in this issue and researching on it now. I will update you
as soon as possible.

Best regards,

Jacob Yang
Microsoft Online Partner Support
Get Secure! ¨C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 18 '05 #3
Hi John,

I have done a lot of research regarding this issue. Please refer to the
following URL carefully.

File Upload Control Object
http://msdn.microsoft.com/library/de...nagement/tools
/reference/file_upload_control.asp
"...
The File Upload Control is an Microsoft ActiveX control onto which users
can drag and drop files or directories for posting to the server hosting
the page with the control.
...

If I have misunderstood your concern, please feel free to let me know.

Best regards,

Jacob Yang
Microsoft Online Partner Support
Get Secure! ¨C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 18 '05 #4
Well i guess that I could go ahead and use that control.
However i still am a bit curious to know where the contenttype is evaluated,
if it in fact is evaluated on the client and passed along in the post for
the server to extract or if the server evaluates it based on it´s knowledge
of files.

Regards
John

"Jacob Yang [MSFT]" <ji***@online.microsoft.com> wrote in message
news:zK**************@cpmsftngxa06.phx.gbl...
Hi John,

I have done a lot of research regarding this issue. Please refer to the
following URL carefully.

File Upload Control Object
http://msdn.microsoft.com/library/de...nagement/tools /reference/file_upload_control.asp
"...
The File Upload Control is an Microsoft ActiveX control onto which users
can drag and drop files or directories for posting to the server hosting
the page with the control.
..

If I have misunderstood your concern, please feel free to let me know.

Best regards,

Jacob Yang
Microsoft Online Partner Support
Get Secure! ¨C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 18 '05 #5
Hi John,

Based on my research and experience, the contenttype is evaluated on the
client. Please refer to the following article for more detailed information
regarding this issue.

File Upload with ASP.NET
http://www.codeproject.com/aspnet/fileupload.asp#get

I hope it helps.

Best regards,

Jacob Yang
Microsoft Online Partner Support
Get Secure! ¨C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 18 '05 #6
Hi John,

Based on my research and experience, the contenttype is evaluated on the
client. Please refer to the following article for more detailed information
regarding this issue.

File Upload with ASP.NET
http://www.codeproject.com/aspnet/fileupload.asp#get

I hope it helps.

Best regards,

Jacob Yang
Microsoft Online Partner Support
Get Secure! ¨C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 18 '05 #7

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

Similar topics

8
2028
by: Bryan Glennon | last post by:
I have an aspx page. If I set the Response.ContentType = "application/voicexml+xml" then when I load browse to the page it downloads the file and opens .Net Studio to allow me to edit it. It...
3
2069
by: darrel | last post by:
I'm creating a tool for people to upload an image and have it resized on the server. I'm checking to first see if the image is a JPG, GIF, BMP or TIF file. I'm having a problem with the TIF files,...
7
1470
by: darrel | last post by:
I'm creating a file upload tool, and want to allow only DOC, XLS, PDF, RTF or TXT files. I am using this to check: if (contentType = "application/msword") _ or (contentType = "application/rtf")...
5
6758
by: Csaba Gabor | last post by:
In Firefox 1.5 (this question is Mozilla specific as I am using greasemonkey) I would like to be able to use document.evaluate to return the first TD entry that shows ^\s*MySearchText\s*$. As I...
3
1558
by: ad | last post by:
I create a MemoryStream form a dataset: MemoryStream sm= new MemoryStream(); dsHealth.WriteXml(sm); I use Response.Write() to send this XML MemoryStream as file to client. What is the...
8
4366
by: Katie | last post by:
Hi, I am trying to set the content type and header for the response object but for some reason it doesnt set it. I tried it on dev and it worked fine but didnot on production. The difference is...
2
7355
by: Björn Langhof | last post by:
Hello. I want to evaluate a XPath-Expression only on a subtree of the whole xml-document. 1. I select a node of the XML-document 2. Then a want to select specific nodes below the node chosen...
0
1702
by: scottf35 | last post by:
Hi, I am working on (read that - upgrading) an application. This application creates an HTTPWebRequest object, populates it with values which are then sucked out of the Request.Form object (eg...
1
450
by: rguarnieri | last post by:
Hi!, I'm using Visual Studio 6.0 and I'm trying to open an asp page like a .pdf file, I used Response.ContentType="application/pdf" in my asp page but it doesn't work This is an example: <%@...
0
7234
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7136
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7505
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5652
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5060
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
4730
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3216
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3203
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1570
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.