Answer the question
In order to leave comments, you need to log in
Streaming File Processing in PHP
Hello.
I want to organize the upload of files to the server via HTTP so that the server subsequently uploads these files to the local DC++. Thus, I need to calculate the TTH of the file. In PHP, by default, the script is called only after the request has been completely received, and the uploaded file is already in the directory for temporary files. Thus, it turns out that the file will have to be read again, and the user will have to wait.
Is there a method to calculate the hash of an uploaded file on the fly without waiting for the upload to complete?
Answer the question
In order to leave comments, you need to log in
Open a listen socket and receive a file.
Here on the fly, count the performance characteristics
maybe using the PUT method?
www.php.net/manual/en/features.file-upload.put-method.php
I can offer 2 options - still use perl to receive the file, or look at how the uploadprogress pecl extension works and perform shamanism on this site. I don't know the normal way.
look in the direction of the extensions that were used for ajax uploading files with a progressbar, now apc is used, but there is something else in pecl, google it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question