问题
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