mardi 26 mai 2015

Upload a image to amazon

I have a problem with my upload on amazon. Is the first time when I tried to put a file on amazon, So my code is :

 if (!defined('awsAccessKey')) define('awsAccessKey', '12345');
 if (!defined('awsSecretKey')) define('awsSecretKey', '2332/4664');`
 $s3 = new S3(awsAccessKey, awsSecretKey);
        $s3->putBucket("gift", S3::ACL_PUBLIC_READ);
        if ($s3->putObjectFile('/var/tmp/'.'50.jpg', "gift", '/var/tmp/'.'50.jpg', S3::ACL_PUBLIC_READ)) {
            echo "Succes";
        }else{
            echo "Error.";
        }

The class S3 I download from http://ift.tt/14WDKxP The image is not uploaded on amazon, Can you help me please? Thx in advance




Aucun commentaire:

Enregistrer un commentaire