Re: retrieve POST body?
| From: | Richard Lynch | Date: | Sun, 22 Apr 2007 06:03:19 +0000 |
| Subject: | Re: retrieve POST body? | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-253474@lists.php.net to get a copy of this message | ||
On Sat, April 21, 2007 1:32 pm, Justin Frim wrote:
> I'm a little lost here though... how can it be possible to put data
> into
> the URI as well as the POST body? The request is originating from the
> user-agent, not the server. Regardless though, the real problem with
> this proposed hack is how, through HTML code, would one instruct the
> user-agent to submit the form using multipart/form-data, but without
> it
> creating a Content-Type: multipart/form-data header in the request!?
> This sounds like an impossible task to me.
You'd use multipart/form-data, but ONLY the type="file" INPUTs would
be in the actual POST data.
So your MD5 would be the MD5 of the uploaded file.
The rest of your inputs would be in GET data:
<form action="whatever.php?input1=foo&input2=bar" method="post"
enctype="multipart/form-data">
<input type="file" name="whatever" />
</form>
You could even use JS to take any other FORM INPUTs and change them to
GET parameters and submit a somewhat hacked POST with everything but
the file in GET parameters.
It won't be pretty...
But it might work and be faster than waiting for the Feature Request...
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?