files content-type

  • Thread starter Thread starter Tim
  • Start date Start date
T

Tim

Is there a way to get a files content-type withOUT using
the HTTP header object (because this is a winForms app).
Maybe using the filestream object somehow?
 
A file's content-type is stored in the registry.
Under the HKEY_CLASSES_ROOT key, there will be a key entry for every file
extension known to the OS. That key in turn will have the content-type
value.
HTH.
Ashwin
 
Thank you. That should do it.

I don't suppose you know how the HTTP (actually the file)
object get's the content-type in a .asp or .aspx page
when a form is submitted using a "<input type=file..."
element, do you?

Maybe it checks the servers registry just like you've
stated here? Just wondering.

Thanks again.
 
Back
Top