Re: php File upload
| From: | mike | Date: | Fri, 08 Aug 2008 20:17:08 +0000 |
| Subject: | Re: php File upload | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-277922@lists.php.net to get a copy of this message | ||
On 8/8/08, Per Jessen <per@computer.org> wrote:
> Same as POST then :-) (except for the resume bit).
>
> I still don't see much of a difference. It doesn't matter much to me,
> I'd just like to understand what the real difference is. Maybe I need
> to go and read RFC2616.
I'm all for using existing POST but it seems like a lot of
configuration needs to occur, and PHP is expecting a single stream of
data. If the stream is broken, how do you resume it? If you accepted
the data raw you could dump the stream to a file until it ends, and
then fseek($fp, $offset) when you get a resume request...
PUT seems to be expected to be straight old "file $x goes here" ... I
actually am not allowing the file to be put on the filesystem directly
but fed to a PHP script.
I am totally down for POST since POST is supported by browsers, flash,
everything, and PUT has some limitations (java applets aplenty, flash
can do it i think but you have to do actual raw socket communication
and I haven't found an applet for that yet)