Re: How to capture uploaded file data

From: Date: Thu, 03 Oct 2013 19:57:45 +0000
Subject: Re: How to capture uploaded file data
References: 1  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-11154@lists.php.net to get a copy of this message
Hi, On Fri, 2013-09-27 at 13:53 +1200, Mariusz Drozdowski wrote: > I'm writing a PHP extension now in c/c++. User uploads a file (could be POST > or PUT method, but I can limit it to POST only). I need to capture the > file data while being uploaded, without writing it to disk on the > server. I need to process the data and (maybe, depending on a > situation) send it somewhere else or save it to disk. > I've been searching around for some time now and I could not find > anything even close to the solution. > Is there any example(s) or existing PHP extension that do(es) something > like this (at least something simmilar) ? > If you could give me any pointers that would be awesome. I don't know if anybody has ever done that, but look around sapi_register_post_entry(), there you might override the handler for post data. Maybe you can set your own then call the original. Probably you have to manipulate SG(known_post_content_types) directly without existing API. Good luck (and feel free to share your result) johannes

« previous php.pecl.dev (#11154) next »