Fine Uploader to S3 bucket getting 405 Method Not Allowed error

后端 未结 2 1919
天命终不由人
天命终不由人 2021-01-18 07:20

I have been banging my head against the wall on this and am entirely stumped. I am trying to use FineUploader to upload files directly to my Amazon S3 bucket. I have essenti

2条回答
  •  长情又很酷
    2021-01-18 07:44

    I had the same issue. Fixed it by adding the region to the function below:

    function getS3Client() {
        global $serverPublicKey, $serverPrivateKey;
    
        return S3Client::factory(array(
            'key' => $serverPublicKey,
            'secret' => $serverPrivateKey,
            'region' => 'ap-southeast-2'  //Revomve from non Sydney bucket
        ));
    }
    

    Find the region of your bucket by clicking on properties. Then Static website hosting and only take the details from the endpoint from ap-xxxxx-x

提交回复
热议问题