将图像上传到亚马逊s3

I am uploading images to amazons3 bucket, but its taking like 2 minutes execution for 10 images but I have to upload 10GB of images, I should receive the update for the each image update make sure its working....

  while($file=readdir($handle)):
            if(is_file($file)){
                $extn = explode('.',$file);
                $extn = array_pop($extn);
                if (in_array(strtolower($extn),$includedExtn)) {
                    set_time_limit(0);
                    if ($s3->putObjectFile($file, $bucketName, baseName($file), S3::ACL_PUBLIC_READ)) {
                        echo "<br/>";
                        echo "S3::putObjectFile(): File copied to {$bucketName}/".baseName($file);
                    } else {
                        echo "S3::putObjectFile(): Failed to copy file
";
                    }
                }
            } else {
                echo "No more files left";
            }
    endwhile;

It looks like you're using pretty-much the same code I use. Mine has the same issue of speed though I got faster results by running the same script concurrently (several times in parallel), it seems each put may be limited, but there are no restriction on the number of concurrent PUTs (or if there is I haven't found it yet). I generally run the script 6 times each from the command-line.

You just need to write your code to ensure it doesn't upload the same file more than once or you'll incur multiple charges for each file (so add something like segmentation to your data-source). I include it in several scripts each which specifies a unique sector it should access from the database.