本文介绍了使用API在OneDrive上创建文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图通过API在OneDrive上创建新文件夹,但出现异常
I am trying to create new folder on OneDrive through API, but I am getting Exception
这是$a = ["name" => "Folder"];
.
如果我将其更改为此:
$a = ["name" => "Folder", "folder" => array()];
$this->provider->post('https://graph.microsoft.com/v1.0/me/drive/root/children',$a,$_SESSION['access_token']);
然后我得到
在示例页面中,我假设folder
值应为空大批.
From the example page I am assuming that folder
value should be empty array.
推荐答案
该文件夹的正确格式为$folderParameters = ["name" => $folderName, "folder" => ["childCount" => '0']];
Correct format for the folder was$folderParameters = ["name" => $folderName, "folder" => ["childCount" => '0']];
这篇关于使用API在OneDrive上创建文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!