jacksonh / manos

Manos is an easy to use, easy to test, high performance web application framework that stays out of your way and makes your life ridiculously simple.
Other
455 stars 61 forks source link

Problem with form fields in multipart/form-data #109

Open konrad-kruczynski opened 13 years ago

konrad-kruczynski commented 13 years ago

I am not sure whether this is an issue or assumption. Currently, values given in the multipart/form-data form are not inserted to method parameters by Manos (i.e. we have default value there) as if they were not sent by browser.

jacksonh commented 13 years ago

Thanks, his does appear to be a valid issue. However, just to make sure we are all on the same page can you submit a test case?

konrad-kruczynski commented 13 years ago

Sorry for the late response. Here's the test case. First HTML:

<form method='POST' enctype='multipart/form-data' action='/upload-go'>
    <input type='file' name='datafile'>
    <input type='hidden' name='dirPath' value='something'>
    <input type='submit'>
</form>

and Manos code:

[Post("/upload-go/")]
public void Upload(IManosContext ctx, string dirPath)
{
    // dirPath is null here
}