No internet access or additional software or services are required.If you’re worried about hard drive space, the Files On-Demand feature lets you browse your OneDrive files in File Explorer without actually downloading them to your PC.You are in control of who, if anyone besides you, has access to the things you store in OneDrive.Once your files are saved to OneDrive, if your device is lost or damaged, your files will still be backed up and protected in the cloud.You can also use any computer to go to the OneDrive website and sign in to access your files.
By using OneDrive, you can quickly transfer files from PC to PC or Mac to PC, so your files are organized like they were on your old computer and you can get right back to work. Here is use txt file as an example.If you've been using your PC for a few years, you probably have some files that you want to move to the new PC. Here client is the object of LiveConnectClient class. Using (IsolatedStorageFileStream fileToSave = storage.OpenFile("sample.txt", FileMode.Create, FileAccess.ReadWrite)) Using (IsolatedStorageFile storage = IsolatedStorageFile.GetUserStoreForApplication()) once the file had downloaded, lets copy it to IsolatedStorage LiveDownloadOperationResult result2 = await client.DownloadAsync(string.Format("/content", id))
to download the file we need to use the id + "/content" if it is what we want, get the id and save it to out already defined id value for every filename, check if it is what we want, in this case "sample.txt" lets make a list of all these filenames LiveOperationResult result = await ("me/skydrive/files") we need to get all of the filenames stored in the root of the skydrive account Try something like this //we first need the file id Which will allow you to call !646/files?access_token=Īnd retrieve the IDs for the individual files, which you can then download via Live SDK following these details: However, with the URL you pasted the ID would be: 281099F4FE69!646 In general you shouldn't construct an ID, since it's possible the IDs will change in the future, and instead you should retrieve the ID from the service.
To access your public folder from Live SDK, you need to either use Live SDK to get the folder-id for your public folder, or convert the IDs in the URL you copied into the format the Live SDK uses: folder. If your scenario doesn't mind asking the user to log in to OneDrive, then you can use the Live SDK to access these files. Those links are links to the web content that shows the files you have shared. How can I directly download the file from the links above (any of them)?īasically, you can't. The file is 300Kb, but this only downloads 6 Kb. TransferRequest.DownloadLocation = downloadUri Uri downloadUri = new Uri(DataSource.TEMPDOWNLOADLOCATION + fileName, UriKind.RelativeOrAbsolute) TransferRequest.TransferPreferences = TransferPreferences.AllowCellularAndBattery Uri transferUri = new Uri(Uri.EscapeUriString(filePathToDownload), UriKind.RelativeOrAbsolute) īackgroundTransferRequest transferRequest = new BackgroundTransferRequest(transferUri) I am using BackgroundTransferRequest to download the file using below code: string filePathToDownload = string.Empty, fileName = "111.mp3"