如何使用GD图像功能设置Google云端存储ACL

I am using "imagepng" to create some thumbnails in my application.

How can I specifically set the ACL for Google Cloud Storage so the file is publically available?

I know I can set the entire bucket to be as such, but I'm interested in being able to do this for the image functions, as well as other file upload methods (the docs only talk about file_put_contents, which I'm not using)

Use the ACL "public-read". There's an example of serving such a thing in the documentation. Example:

$options = [ "gs" => [ "Content-Type" => $fileType, "acl"=>"public-read" ]];
$ctx = stream_context_create($options);
file_put_contents("gs://hooliapp.appspot.com/".$fileName, $file, 0, $ctx);
$object_public_url = CloudStorageTools::getPublicUrl('gs://hooliapp.appspot.com/'.$fileName, true);