Can someone tell me how to remove an object from Google Cloud Storage using PHP?
I found how to add an object through
move_uploaded_file($gs_name, "gs://sample-storage/myfolder/new_file2.jpg");
get public URL through
$public_url = CloudStorageTools::getPublicUrl("gs://sample-storage/myfolder/new_file2.jpg", true);
Also, by importing the following:
require_once 'google/appengine/api/cloud_storage/CloudStorageTools.php';
use google\appengine\api\cloud_storage\CloudStorageTools;
But how do you delete a file using PHP?
Can anyone share this code in PHP? Even using JavaScript if PHP doesn't support it implicitly.
source
share