本文介绍了OneDrive SDK windows phone 8.1 permisions上传文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 开发一个与OneDrive同步的Windows Phone 8.1应用程序。我正在使用OneDrive sdk API。 在我的手机(以及我的OneDrive acc)中,我可以编辑,删除,重命名和 SAVE文件。我的朋友正在测试这个应用程序和应用程序运行良好,但他不能保存文件。单击以保存按钮应用程序崩溃后出现意外错误。我们正在尝试使用相同的文件,因此我不知道为什么它可以在我的OneDrive和我的朋友OneDrive上运行。 OneDrive是否有一些安全设置? 我的验证码(通过 https://github.com/OneDrive/onedrive-sdk-csharp/blob/ master / docs / auth.md ) var oneDriveClient = OneDriveClientExtensions 。 GetClientUsingOnlineIdAuthenticator ( 范围 ); 等待oneDriveClient 。 AuthenticateAsync (); 这是我的上传代码 MemoryStream stream = new MemoryStream (); StreamWriter writer = new StreamWriter ( stream ); writer 。 写 ( UploadString ); writer 。 Flush (); stream 。 职位 = 0 ; var itemWithUpdates = 等待oneDriveClient 。 驱动器 。 项目 [ Id ] 。 内容 。 请求 () 。 PutAsync < 项目 >( stream ); 解决方案 您需要Live SDK人员的帮助。请参阅: Live Connect论坛重新定位到堆栈溢出 'm developing an aplication for Windows Phone 8.1 which is synchronized with OneDrive. I'm using OneDrive sdk API.In my phone (and my OneDrive acc) I'm able to edit, delete, rename and SAVE files. My friend is testing this app and app working well but he CAN'T SAVE the files. After Click to save button application crash with unexpected error. We are trying it on the same files so I don't know why it works on my OneDrive and on my friends OneDrive not. Does OneDrive has some security settings ?My authentication code (via https://github.com/OneDrive/onedrive-sdk-csharp/blob/master/docs/auth.md ) var oneDriveClient = OneDriveClientExtensions.GetClientUsingOnlineIdAuthenticator(scopes); await oneDriveClient.AuthenticateAsync();Here is my upload codeMemoryStream stream = new MemoryStream(); StreamWriter writer = new StreamWriter(stream); writer.Write(UploadString); writer.Flush(); stream.Position = 0; var itemWithUpdates = await oneDriveClient .Drive .Items[Id] .Content .Request() .PutAsync<Item>(stream); 解决方案 You'll need help from the Live SDK folks for this. Please see: Live Connect Forum Relocated to Stack Overflow 这篇关于OneDrive SDK windows phone 8.1 permisions上传文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-29 07:55