Re: Sending files via POST
| From: | Daniel Brown | Date: | Thu, 01 Jan 2009 08:14:51 +0000 |
| Subject: | Re: Sending files via POST | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-285330@lists.php.net to get a copy of this message | ||
On Thu, Jan 1, 2009 at 02:35, Anders Norrbring <anders@norrbring.se> wrote:
> I'm a bit stuck.. I'm using the PEAR http_Request to send files and data as
> HTTP POST, which is working fine if I in fact have the files on disk on the
> server. Just using the method addFile..
Okay....
> But what if the file data is only in a variable? It feels like overkill to
> first save to disk, and then read it in with addFile... The HTTP POST I'm
> looking at will need to add "files" both from disk and variables.
.... then it's not a file, it's data held in RAM (non-TSR).
Are you looking to stream the file content (such as the header or
initial $n bytes) from you local system to the server? If so, sorry,
but you're in the wrong place.
> Ideas are welcome..
My idea is to ask the question: how is the "file data" getting
into the "variable"?
--
</Daniel P. Brown>
daniel.brown@parasane.net || danbrown@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
Unadvertised dedicated server deals, too low to print - email me to find out!