tpyo / amazon-s3-php-class

A standalone Amazon S3 (REST) client for PHP 5/CURL
1.03k stars 503 forks source link

S3::putObject(): [BadDigest] The Content-MD5 you specified did not match what we received. [APP/Vendor/S3/S3.php, line 355] #89

Closed anupamapanchal closed 9 years ago

anupamapanchal commented 10 years ago

Hey.. we are using amazon-s3-php-class for our site http:://gridle.io with cakephp. On uploading a photo I am getting the following error.

S3::putObject(): [BadDigest] The Content-MD5 you specified did not match what we received. [APP/Vendor/S3/S3.php, line 355]

Can anyone help me with this error?

ganeshvenugopal commented 9 years ago

Hi... I am also facing the same problem when I try to upload .zip file format but I have tried with .xml file format which got uploaded successfully.

Pls can some one assits how to handle this ASAP.

clphillips commented 9 years ago

The issue is that S3 is invoking filesize(), which returns cached results. This means that S3 may send the wrong file size to Amazon, resulting in the aforementioned error. See my pull request #99 for a fix.

tpyo commented 9 years ago

Closed with #99