Why I am getting this error?

16 views
Skip to first unread message

Shantanu Kulkarni

unread,
May 16, 2022, 1:35:29 PM5/16/22
to google-cloud-storage-discuss
I am copying file from one path to another (bucket is same) but when I copy image using google storage library (php version) , image  copied successfully but image is not accessible by public/anonymous (See screenshot)

Screenshot 2022-05-15 190632.png

my code => 

 $oldObj =  $this->gcs->objects->copy(
              $bucket, $oldpath,
              $bucket, $newpath,
              $oldObj
          );

perezsanchez

unread,
May 17, 2022, 5:49:35 PM5/17/22
to google-cloud-storage-discuss

To resolve it you can use Postman, if Postman does not return the XML error once you try a GET. You can perform some additional research after noticing that the site returned in a Postman GET to www.pbi-static.org, and I came across this link: https://cloud.google.com/storage/docs/configuring-cors#gsutil


Following the instructions to create a JSON file that allowed the Get verb and using the gsutil command given the issue can be fixed.


Also when creating a new static website, you'll get an error unless you follow the instructions in https://cloud.google.com/storage/docs/gsutil/commands/web.


An additional possible solution is to view the RSS Feed in CRM using Internet Explorer. The error notice will no longer appear. Chrome doesn't have a RSS reader built-in.

Reply all
Reply to author
Forward
0 new messages