Robiłem coś podobnego na plupload:
http://www.plupload.com/, ciekawe rozwiązanie
// Open temp file
$out = fopen($targetDir . DIRECTORY_SEPARATOR
. $fileName, $chunk == 0 ?
"wb" : "ab"); if ($out) {
// Read binary input stream and append it to temp file
$in = fopen("php://input", "rb");
if ($in) {
while ($buff = fread($in, 4096
)) } else
die('{"jsonrpc" : "2.0", "error" : {"code": 101, "message": "Failed to open input stream."}, "id" : "id"}');
} else
die('{"jsonrpc" : "2.0", "error" : {"code": 102, "message": "Failed to open output stream."}, "id" : "id"}'); }
Czyli plik w tym wypadku jest zapisywany do pamięci podręcznej i dzielony na kawałki. Może być podobnie...