Skip to content

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

Open
racklin wants to merge 1 commit into
tpyo:masterfrom
racklin:progressfunc
Open

Added CURL progress function callback when downloading/uploading.#129
racklin wants to merge 1 commit into
tpyo:masterfrom
racklin:progressfunc

Conversation

@racklin

@racklin racklin commented Dec 15, 2016

Copy link
Copy Markdown
Contributor

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

tpyo commented Mar 14, 2017

Copy link
Copy Markdown
Owner

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