some questions about the upload module
valery+nginxen at grid.net.ru
Tue Sep 9 23:10:37 MSD 2008
"Manlio Perillo" <manlio_perillo at libero.it> wrote:
> Then I'm not sure to understand.
> What's the benefit of using multipart/form-data if data is encoded in
> this way?
> Isn't it better to use application/x-www-form-urlencoded?
> Note that this was the original idea I had in mind to implement.
It depends. First, if you have simple form with one file field it might be
more efficient to use application/x-www-form-urlencoded. But generally you
may have something like a text area for an Email body and this information
hardly fits into request URI and most frameworks are likely not to be
compatible with request URIs of unlimited size and this could be
Second, POST has side effects and GET hasn't, thus they are incompatible
at this point.
Third, for application/x-www-form-urlencoded I have to do URL encoding.
All these things are arguments against application/x-www-form-urlencoded
from my point of view, thus I use multipart/form-data.
> Using multipart/form-data, I would instead return
> Content-Disposition: form-data; name="submit-name"
> Content-Disposition: form-data; name="files_name"; filename="file1.txt";
I'm not sure an arbitrary framework can process "path" parameter and
moreover one would treat this field as file field, since filename is
More information about the nginx