Microsoft Graph:在OneDrive上将文件上传到与我共享文件夹吗? [英] Microsoft Graph: Uploading files to shared with me folder on OneDrive?

查看:200
本文介绍了Microsoft Graph:在OneDrive上将文件上传到与我共享文件夹吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我能够使用

I was able to successfully upload to Shared Documents folder using this approach. But I am looking for a way to upload files to Shared WithMe folder on OneDrive.

是否可以上传到OneDrive上的"/Shared WithMe"文件夹?如果是这样,那么PUT(小文件)或POST(上传会话)的正确语法是什么?我花了很多时间来解决这个问题,但是没有运气.

Is it possible to upload to "/Shared WithMe" folder on OneDrive? If so, which is the right syntax for the PUT (small file) or POST (upload session)? I spent a lot of time to figure this out but no luck.

任何帮助将不胜感激.

推荐答案

我成功地采用了这种方法:

I had success with this approach:

PUT /drives/{driveid}/items/{itemid}/content

我能够从DriveItem实体中检索driveiditemid.对于给定的DriveItemdriveid位于DriveItem.RemoteItem.ParentReference.DriveId(

I was able to retrieve the driveid and the itemid from the DriveItem entity. For a given DriveItem, the driveid is at DriveItem.RemoteItem.ParentReference.DriveId (ItemReference docs) and the itemid is at DriveItem.RemoteItem.Id (RemoteItem docs).

Files.ReadWrite.All权限似乎是必需的.

The Files.ReadWrite.All permission seems to be required.

这种方法在UWP C#Graph SDK中对我有用.

This approach worked for me in the UWP C# Graph SDK.

这篇关于Microsoft Graph:在OneDrive上将文件上传到与我共享文件夹吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆