2

I want to upload a file to amazon s3 via php webpage (php sdk). My putobject code shows this problem :

Uncaught exception 'InvalidArgumentException'

with message '

Found 1 error while validating the input provided for the PutObject operation: [Bucket] is missing and is a required parameter' in ..

However, I've entered all parameters as :

$s3->putObject([            
'Bucket' => $config['s3']['bucket'], //bucket name
            'Key' => '{$name}',     //file name info    
            'Body' => fopen($temp_file_path, 'r'), //file path  
            'ACL' => 'public-read' ]);

whats the problem here?

0 Answers0