locked
uplad files to onedrive is empty RRS feed

  • Question

  • I'm following this tutorial to upload files to onedrive but the files is empty just upload the name of the file

    http://developer.nokia.com/community/wiki/SkyDrive_-_How_to_upload_content_on_Windows_Phone

    using (IsolatedStorageFile store = IsolatedStorageFile.GetUserStoreForApplication())      {             using (var fileStream = store.OpenFile(strSaveName, FileMode.Open, FileAccess.Read, FileShare.Read))            {                    try                    {                                               LiveOperationResult res = await client.BackgroundUploadAsync("me/skydrive",                                                                                    new Uri("/shared/transfers/"+fileName, UriKind.Relative),                                                                                    OverwriteOption.Overwrite                                                                                    );                                          }   catch (Exception ex)  {                     }             }       }

    Sunday, January 25, 2015 11:56 PM

All replies

  • Maybe you are using the old version SkyDrive API. Please try to change to choose an appropriate one from here. https://msdn.microsoft.com/en-us/library/dn631819.aspx. Restful service is more popular.

    Tuesday, January 27, 2015 3:23 AM
  • I'm using the version what's support the windows phone 7.x why I'm develop an app for that OS the new version don't support the windows phone 7 I'll try this sample too. http://wp.qmatteoq.com/backup-and-restore-on-skydrive-in-windows-phone/ But shows me error with stream in the line using (IsolatedStorageFile storage = IsolatedStorageFile.GetUserStoreForApplication()) { IsolatedStorageFileStream stream = storage.OpenFile(filename, FileMode.Open); client.UploadAsync("me/skydrive", "/shared/transfers/" + filename, stream, OverwriteOption.Overwrite); } What I can do?
    Tuesday, January 27, 2015 5:56 AM