C# UWP LiveSKD and OneDrive access using FileOpenPicker

☆樱花仙子☆ 提交于 2019-12-22 18:27:20

问题


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.

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.

According to https://dev.onedrive.com/

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

And also here https://dev.onedrive.com/sdks.htm, it says

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.

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

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?

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:

How to open a file from OneDrive with FileOpenPicker?

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


回答1:


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.



来源:https://stackoverflow.com/questions/32717453/c-sharp-uwp-liveskd-and-onedrive-access-using-fileopenpicker

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!