Tapestry 5
  1. Tapestry 5
  2. TAP5-1118

Using Ajax updates to add an Upload component to an existing Form fails in IE, which still sends application/x-www-form-urlencoded encoded request

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.1.0.5
    • Fix Version/s: 5.2.1
    • Component/s: tapestry-upload
    • Labels:
      None

      Description

      When injecting an upload component via form injector, it tries to set the enctype of the form to "multipart/form-data". This works ok on most browsers, but as expected, IE doesn't like it... IE still sends the POST request as "application/x-www-form-urlencoded".

      Nevertheless, there is a workaround (http://www.bennadel.com/blog/1273-Setting-Form-EncType-Dynamically-To-Multipart-Form-Data-In-IE-Internet-Explorer-.htm) that is to set not only the enctype but also the encoding of the form, which IE uses when submiting the form.

      In practice, it only requires to change upload.js to something like this:

      Tapestry.Initializer.injectedUpload = function(element)

      { var form = $(element).form; form.enctype = "multipart/form-data"; form.encoding = "multipart/form-data"; }

        Activity

        Raul Montes created issue -
        Howard M. Lewis Ship made changes -
        Field Original Value New Value
        Assignee Howard M. Lewis Ship [ hlship ]
        Howard M. Lewis Ship made changes -
        Summary Setting form.enctype in JavaScript doesn't work in IE Using Ajax updates to add an Upload component to an existing Form fails in IE, which still sends application/x-www-form-urlencoded encoded request
        Component/s tapestry-upload [ 12312538 ]
        Howard M. Lewis Ship made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Fix Version/s 5.2.1 [ 12315230 ]
        Resolution Fixed [ 1 ]
        Hide
        Hudson added a comment -

        Integrated in tapestry-5.2-freestyle #182 (See https://hudson.apache.org/hudson/job/tapestry-5.2-freestyle/182/)
        TAP5-1118: Using Ajax updates to add an Upload component to an existing Form fails in IE, which still sends application/x-www-form-urlencoded encoded request

        Show
        Hudson added a comment - Integrated in tapestry-5.2-freestyle #182 (See https://hudson.apache.org/hudson/job/tapestry-5.2-freestyle/182/ ) TAP5-1118 : Using Ajax updates to add an Upload component to an existing Form fails in IE, which still sends application/x-www-form-urlencoded encoded request
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        125d 21h 12m 1 Howard M. Lewis Ship 31/Aug/10 17:33

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Raul Montes
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development