Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. How to formulate a file upload mime type for an ASPX page?

How to formulate a file upload mime type for an ASPX page?

Scheduled Pinned Locked Moved ASP.NET
helphtmlsysadminwindows-adminxml
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    LizardWiz
    wrote on last edited by
    #1

    I am not sure whether or not this is in the right forum. Feel free to move it if it is not. I am having an issue formulating a form based file upload in HTML to an ASPX page on an IIS server. I am referencing RFC 1867 to get the appropriate syntax, and I guess RFC 1521 that outlines the MIME data streams. Here is the issue, the post itself is being formulated and works fine as long I do not add the filename="" parameter to the end of the content-disposition header. The second that filename="" parameter gets added to the content-disposition header for that particular parameter the ASPX page no longer recognizes it in the parameters collection. Is there something that I am doing wrong here? Here is a sample of the syntax being sent. WORKS: Content-Disposition: form-data; name="" DOES NOT WORK: Content-Disposition: form-data; name=""; filename="" Also, once this gets working I just have a couple other questions... #1) What should be the "proper" Content-Type parameter value for an XML file? Content-Type: text/XML? #2) If I send the Content-Transfer-Encoding: base64 parameter, will the ASPX page barf? #3) I am assuming that I can get the extended field parameter attributes somehow through ASPX, is this so? Please help...

    ~LizardWiz()

    P 1 Reply Last reply
    0
    • L LizardWiz

      I am not sure whether or not this is in the right forum. Feel free to move it if it is not. I am having an issue formulating a form based file upload in HTML to an ASPX page on an IIS server. I am referencing RFC 1867 to get the appropriate syntax, and I guess RFC 1521 that outlines the MIME data streams. Here is the issue, the post itself is being formulated and works fine as long I do not add the filename="" parameter to the end of the content-disposition header. The second that filename="" parameter gets added to the content-disposition header for that particular parameter the ASPX page no longer recognizes it in the parameters collection. Is there something that I am doing wrong here? Here is a sample of the syntax being sent. WORKS: Content-Disposition: form-data; name="" DOES NOT WORK: Content-Disposition: form-data; name=""; filename="" Also, once this gets working I just have a couple other questions... #1) What should be the "proper" Content-Type parameter value for an XML file? Content-Type: text/XML? #2) If I send the Content-Transfer-Encoding: base64 parameter, will the ASPX page barf? #3) I am assuming that I can get the extended field parameter attributes somehow through ASPX, is this so? Please help...

      ~LizardWiz()

      P Offline
      P Offline
      pmarfleet
      wrote on last edited by
      #2

      LizardWiz wrote:

      I am having an issue formulating a form based file upload

      Presumably you mean download?

      Paul Marfleet

      L 1 Reply Last reply
      0
      • P pmarfleet

        LizardWiz wrote:

        I am having an issue formulating a form based file upload

        Presumably you mean download?

        Paul Marfleet

        L Offline
        L Offline
        LizardWiz
        wrote on last edited by
        #3

        No I mean upload. Isn't there something in HTML that looks like this < INPUT type = "file" >?

        ~LizardWiz()

        P 1 Reply Last reply
        0
        • L LizardWiz

          No I mean upload. Isn't there something in HTML that looks like this < INPUT type = "file" >?

          ~LizardWiz()

          P Offline
          P Offline
          pmarfleet
          wrote on last edited by
          #4

          LizardWiz wrote:

          Isn't there something in HTML that looks like this < INPUT type = "file" >?

          That is HTML. If you are using ASP.NET 2.0, you can use the FileUpload[^]control to add file upload capabilities to your web page. .NET takes care of the low-level details for you.

          Paul Marfleet

          L 1 Reply Last reply
          0
          • P pmarfleet

            LizardWiz wrote:

            Isn't there something in HTML that looks like this < INPUT type = "file" >?

            That is HTML. If you are using ASP.NET 2.0, you can use the FileUpload[^]control to add file upload capabilities to your web page. .NET takes care of the low-level details for you.

            Paul Marfleet

            L Offline
            L Offline
            LizardWiz
            wrote on last edited by
            #5

            I am not formulating this post using an HTML page. I am formulating it in C++ from a windows service. When I use the syntax provided to me in RFC 1867,the ASPX page does not add the parameter into the form parameters collection. So my question is, how do I get the ASPX page to add the parameter into the forms parameter collection? And how can I access the extended parameter attributes?

            ~LizardWiz()

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups