[英]How to create a folder using OneDrive SDK
For the life of me I cannot find out how to create a folder or list all folders using the OneDrive SDK. 我一生都无法找到如何使用OneDrive SDK创建文件夹或列出所有文件夹的方法。 Note please this is using the SDK NOT Api.
请注意,这是使用SDK NOT Api。 Can someone please show me how to do this?
有人可以告诉我该怎么做吗?
My aim is to allow users to upload files to a custom directory using a onedrive app using the onedrive SDK 我的目标是允许用户使用onedrive SDK使用onedrive应用程序将文件上传到自定义目录
As much as I know SDK uses the same API in the box. 据我所知,SDK在框中使用了相同的API。 Anyway you can try the following way:
无论如何,您可以尝试以下方式:
var folderToCreate = new Item { Name = folderName, Folder = new Folder() };
var newFolder = await client.Drive.Items[parentId].Children.Request().AddAsync(folderToCreate);
https://github.com/OneDrive/onedrive-sdk-csharp/issues/24 https://github.com/OneDrive/onedrive-sdk-csharp/blob/master/docs/items.md#create-a-folder https://github.com/OneDrive/onedrive-sdk-csharp/issues/24 https://github.com/OneDrive/onedrive-sdk-csharp/blob/master/docs/items.md#create-a-folder
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.