Skip to content

Conversation

racklin
Copy link
Contributor

@racklin racklin commented Dec 15, 2016

Add a progress function when S3 downloading / uploading

S3::setProgressFunction('progress');

function progress($resource,$download_size, $downloaded, $upload_size, $uploaded)
{
    if($download_size > 0)
         echo $downloaded / $download_size  * 100;
    ob_flush();
    flush();
    sleep(1); // just to see effect
}

@tpyo
Copy link
Owner

tpyo commented Mar 14, 2017

Again, sorry for the late response @racklin. Could you please make some code-styling tweaks? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants