使用FileOpenPicker的C#UWP LiveSKD和OneDrive访问 [英] C# UWP LiveSKD and OneDrive access using FileOpenPicker

查看:125
本文介绍了使用FileOpenPicker的C#UWP LiveSKD和OneDrive访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发通用Windows平台应用程序,该应用程序允许用户使用FileOpenPicker打开和编辑文件.这个想法是,用户可以选择计算机上的任何文件,包括位于其OneDrive文件夹中的文件.在Windows 10桌面上,它运行良好.

I'm developing a Universal Windows Platform app that allows a user to open and edit files using the FileOpenPicker. The idea is that the user can choose any file on their computer, including files located in their OneDrive folders. On Windows 10 Desktop, this is working perfectly.

但是,在Windows Phone 10设备上,结果却大不相同.当用户使用选择器选择文件时,该文件将下载到本地存储文件夹中,并且用户可以编辑该文件.但是,在编辑文件时,不会将其同步回OneDrive.

However, on a Windows Phone 10 device, the result is very different. When a user chooses a file with the picker, the file is downloaded to a local storage folder, and the user is able to edit the file. But when the file is edited, it is not synced back to OneDrive.

根据 https://dev.onedrive.com/

Picker SDK使您的应用几乎无需任何代码即可在OneDrive上打开和保存文件.

Picker SDKs enable your app to open and save files on OneDrive with hardly any code.

还有 https://dev.onedrive.com/sdks.htm ,它说

只需几分钟,用几行代码即可将OneDrive添加到您的应用程序中. 从OneDrive获取链接以共享或下载文件内容. 将用户本地设备上的文件保存到OneDrive,以便在所有用户设备上都可用.

Add OneDrive to your app in minutes with a few lines of code. Get a link from OneDrive for sharing or downloading the contents of a file. Save a file on the user's local device to OneDrive so it's available on all your users' devices.

这让我有些困惑.据我了解,我应该能够使用选择器从OneDrive打开文件,并保存它们.但是似乎只能打开该文件,并且当我编辑它时,仅修改了本地副本.它永远不会同步回OneDrive

This is a little confusing to me. From what I understand, I should be able to open files from OneDrive using the picker, and also save them. But is seems to only be able to open the file, and when I edit it, only the local copy is modified. It's never synced back to OneDrive

还有其他人遇到过此问题吗?有谁知道如何使用FileOpenPicker在OneDrive上打开和修改文件,并将其同步回OneDrive?

Has anyone else experienced this issue? Does anyone know how to use the FileOpenPicker to open and modify a file on OneDrive, and have it synced back to OneDrive?

顺便说一句,我也研究了这个stackoverflow问题和答案,但这似乎并不能解决我遇到的同一问题:

By the way, I have also looked at this stackoverflow question and answer, but this doesn't seem to address the same issue I am having:

如何使用FileOpenPicker从OneDrive打开文件? /a>

How to open a file from OneDrive with FileOpenPicker?

我真的很感谢对此的任何帮助或指导.谢谢!

I really appreciate any help or guidance on this. Thanks!

推荐答案

我遇到了同样的问题,并且自从WP 8.1引入API以来,OneDrive应用程序就一直存在这种问题.该API可以正常工作,因为Dropbox应用支持它们,并且可以按预期工作.您可以对此进行测试,并希望Microsoft能够共同行动.

I'm having the same issue and it has been like this with the OneDrive app since the API's were introduced with WP 8.1. The API's work fine because the Dropbox app supports them and it works as expected. You can do testing with that and hopefully Microsoft will get their act together.

There's a post on the msdn forums back in July of 2014 about it and other issues with no answers.

这篇关于使用FileOpenPicker的C#UWP LiveSKD和OneDrive访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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