Unable to set file access to private on file Upload on spaces

Posted September 7, 2018 1.3k views
APIUbuntu 18.04


We are using the Amazon AWS sdk for php and we are creating the “PutObject"as follows

$command = $this->client->getCommand(‘PutObject’, [
'Bucket’ => $this->bucket,
'Key’ => $this->key,
'Body’ => $this->body,
'ACL’ => $this->acl,

I have checked that this is the structure which is correct as per this link PutObejct Syntax

But when the object is uploaded to digitalocean spaces,the access specifier is still public which should be private as we are specifying the value "private” in the 'ACL’ key.

Any leads as to why the expected behaviour is not working is highly appreciated.

Link for reference:ACL Overview

Submit an answer

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!