I want to organize the uploading of files to the server via HTTP so that the server subsequently posted these files on the local DC++. So I need to calculate the TTH of the file. In PHP the default script is called only after the request has been completely received, and the downloaded file is already in the directory for temporary files. Thus it turns out that the file will have to re-read, and the user will have to wait.
Is there a way to calculate the hash of the downloaded file on the fly, without waiting the end of download?