Vote count:
0
I am Unable to rename Google Cloud Storage object, Following is the simple code i tried with, but
require_once 'google/appengine/api/cloud_storage/CloudStorageTools.php';
use google\appengine\api\cloud_storage\CloudStorageTools;
$core_url = 'gs://store.lonel.com/F9BEA944A8543F.jpg';
$ctx = [
'gs' => [
'enable_cache' => true,
'enable_optimistic_cache' => true,
'read_cache_expiry_seconds' => 300,
]
];
$ctx_res = stream_context_set_default($ctx);
if (false == rename($core_url, 'gs://store.lonel.com/MMMF9BEA944A8543F.jpg',$ctx_res))
{
die('Could not rename.');
}else{
echo 'Done renaming';
}
I have inserted object using Google Cloud Storage API request.
Output:
Warning: Unable to rename: gs://store.lonel.com/MMMF9BEA944A8543F.jpg. Cloud Storage Error: NOT FOUND in C:\Program Files\Google\google_appengine\php\sdk\google\appengine\ext\cloud_storage_streams\CloudStorageRenameClient.php on line 77
Instead Down-vote Comment/Edit the question, Thanks Please help me to rename the object.
asked 1 min ago
Aucun commentaire:
Enregistrer un commentaire