Evaluate contenttype

  • Thread starter Thread starter John Boghossian
  • Start date Start date
J

John Boghossian

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
 
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.
 
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
 
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/default.asp?url=/workshop/management/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.
 
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
 
Back
Top