Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added CURL progress function callback when downloading/uploading. #129

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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