嘿家伙我是谷歌云存储的新手..
我想用PHP编码在桶中创建文件夹.我搜索了很少的网站,1我看到它写了:
"在存储桶中创建文件夹将创建一个以目录命名的占位符对象,没有数据内容和mimetype application/x-directory.不支持在Google Storage Manager中创建的目录占位符对象."
我无法理解它想说的是什么.我如何创建文件夹请帮助我.我尝试使用以下代码:
$req = new Google_HttpRequest("http://commondatastorage.googleapis.com/bucket/myfoldertrial");
$req->setRequestHeaders(array(
'x-goog-project-id' => 21212,
'x-goog-acl' => 'public-read',
'Content-Type' => 'application/x-directory'
));
$req->setRequestMethod('PUT');
$req->setPostBody('myfoldertrial');
Run Code Online (Sandbox Code Playgroud)
我正在使用以下链接中的API:
请帮我用PHP创建文件夹.