amazon-s3-php-class
amazon-s3-php-class copied to clipboard
Added CURL progress function callback when downloading/uploading.
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
}
Again, sorry for the late response @racklin. Could you please make some code-styling tweaks? Thanks!