删除在Google App Engine中上传的文件

时间:2017-08-14 04:15:53

标签: php laravel google-app-engine laravel-5

deleteImageServingUrl 

如何使用deleteImageServingUrl从GAE中删除上传的文件。

 if (getenv('APP_ENGINE_ENVIRONMENT') == 'PRODUCTION') {
                $bucket = getenv('PRODUCTION_UPLOAD_BUCKET_NAME');
            } else {
                $bucket = getenv('TESTING_UPLOAD_BUCKET_NAME');
            }
    $root_path = 'gs://' . $bucket . '/';
    $file_name = 'post_attachments_34-Funny-Duck-Dancing-Picture.jpg';
    $root_path .= $file_name;
    $delete_image = CloudStorageTools::deleteImageServingUrl($root_path);

0 个答案:

没有答案