Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Gerhard 7 posts 27 karma points
    Feb 27, 2013 @ 23:06
    Gerhard
    0

    Form post with upload (multipart/form-data) gives 404

    I'm using Umbraco 4.11.3

    I've created some macros that load ascx files. In one of these files, I added the following code:

    enctype="multipart/form-data">
     



    When I press the submit button, I get a 404. When I remove the enctype, the form works fine.

    I need to be able to upload files. Anyone have a clue about what's going on and how to fix this? I guess that it might something to do with mapping urls? Btw, I'm using extensionless urls.

     

  • Gerhard 7 posts 27 karma points
    Feb 27, 2013 @ 23:34
    Gerhard
    0

    Ow, I see that I actually injected HTML :) Should be reported as a bug (can reproduce).

    So, I hope that this helps:

    This works:

    <form id="xyz" method="post">
      <input type="submit" />
    </form>  

    This does not work and gives a 404:

    <form id="xyz" method="post" enctype="multipart/form-data">
      <input type="submit" />
    </form>  

  • Gerhard 7 posts 27 karma points
    Feb 28, 2013 @ 12:51
    Gerhard
    0

    Btw, I found out that multipart/form-data does work on my homepage (only), but that makes sense.

  • Gerhard 7 posts 27 karma points
    Mar 01, 2013 @ 12:00
    Gerhard
    0

    Noone has an answer? I think that this should be very simple... At least, is this repro for any of you guys? Please insert the html in a masterpage and try...

    I'm still fairly new to Umbraco, but I'm quite sure that this has something to do with url rewriting. I might have done something wrong in the configuration, but I just don't have a clue what. Or maybe I should implement rewrite rules of some kind...

    I have a backup solution if everything failes, but I will have to use flash (jquery uploadify). This is rather dirty in my opinion, and preferably I'd like my site to work on iPhone/Android as well (which isn't the case with flash).

Please Sign in or register to post replies

Write your reply to:

Draft