php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #3367 PHP code callback during file upload
Submitted: 2000-01-31 19:05 UTC Modified: 2006-10-27 00:48 UTC
Votes:11
Avg. Score:4.5 ± 1.2
Reproduced:6 of 7 (85.7%)
Same Version:4 (66.7%)
Same OS:5 (83.3%)
From: cclarke at netcom dot com Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.0 OS: All
Private report: No CVE-ID: None
 [2000-01-31 19:05 UTC] cclarke at netcom dot com
It would be very useful if one could invoke some PHP code periodically during the HTTP file upload process (while PHP is creating the temporary file, before the page generally starts processing).   

This would enable a PHP user to build a file upload feature that provides feedback and estimated time remaining to users.   

This may be similar to "ticks" mentioned in the technical summary of your January meeting, but this is for a part of the process that currently preceeds the execution of any PHP code.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-02-10 14:04 UTC] jimw@php.net
refiled against 4.0.
 [2001-08-28 04:10 UTC] sander@php.net
-----from 7463-----
Hello,
I would like to see a feature in PHP, that solves a problem I currently only can solve by
writing a CGI script in Perl, which I'd rather not do...
I understand that when uploading a file (POST request) from a form, the file is stored at
a temporary location on the server. However, I want to read file data in small chunks,
passing each chunk along to another server, i.e. "stream" the file data through
my server. Is this anything that would be interesting to introduce in PHP, or is it
already possible and I'm making a fool of myself? :-)
Btw, the key issue here is that I want to make it possible to send a file that is 1 Gb (or
some other large value) in size to my server, that only has 200 Mb (less than the file
size) of free space...

Best regards,
Per J?nsson

 [2004-02-09 11:42 UTC] pdoru at kappa dot ro
there were some submissions on php-dev in Nov-Dec 2003 regarding a patch for this that implemented a callback in rfc1867.c

maybe somneone will look at it ?
 [2006-10-27 00:48 UTC] rasmus@php.net
Hooks are in 5.2 now
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 21:01:31 2024 UTC