files content-type

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tim

    #1

    files content-type

    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?
  • Ashwin Kambli

    #2
    Re: files content-type

    A file's content-type is stored in the registry.
    Under the HKEY_CLASSES_RO OT 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
    "Tim" <tim.leforge@al ticor.com> wrote in message
    news:0a2b01c3b9 a9$bc6dcd30$a50 1280a@phx.gbl.. .[color=blue]
    > 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?[/color]


    Comment

    • Tim

      #3
      Re: files content-type

      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.

      Comment

      Working...