Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to download files from OneDrive

I am looking to download my files in public folder from One Drive, but it doesn't download the files. Here is the scenario:

In public folder I have another folder with multiple files in it and is accessible widely. for test purpose I have shared all the files in public folder (I don't if it's proper way of sharing it).

The following links are provided for me to download the file:

  1. From shared folder link https://onedrive.live.com/redir?resid=DBBC281099F4FE69!646&authkey=!AGRCGuw8Y2_p9mA&ithint=folder%2c.mp3
  2. From public folder link https://onedrive.live.com/redir?resid=DBBC281099F4FE69%21646
  3. Direct link http://1drv.ms/1z9XlW6 -

I am using BackgroundTransferRequest to download the file using below code:

string filePathToDownload = string.Empty, fileName = "111.mp3";
filePathToDownload = "http://1drv.ms/1z9XlW6";

Uri transferUri = new Uri(Uri.EscapeUriString(filePathToDownload), UriKind.RelativeOrAbsolute);
BackgroundTransferRequest transferRequest = new BackgroundTransferRequest(transferUri);
transferRequest.Method = "GET";
transferRequest.TransferPreferences = TransferPreferences.AllowCellularAndBattery;

Uri downloadUri = new Uri(DataSource.TEMPDOWNLOADLOCATION + fileName, UriKind.RelativeOrAbsolute);
transferRequest.DownloadLocation = downloadUri;
transferRequest.Tag = fileName;

The file is 300Kb, but this only downloads 6 Kb.

How can I directly download the file from the links above (any of them)?

thanks!

like image 582
ARH Avatar asked Jul 03 '14 11:07

ARH


People also ask

Why can't I download files from OneDrive?

Restart the OneDrive App or Computer. Generally, restarting the device or app can solve most issues, including OneDrive zip download not working. So, you can quit your OneDrive app and restart it to see if it can back to normal. If this does not work, you can also try to restart the computer.

How do I move files from OneDrive to download?

Select the files, and then drag and drop them into your OneDrive folder. Blue circular arrows beside your files mean that they're syncing to the cloud. When they're done syncing, green check marks are displayed.

Why is there no download button on OneDrive?

The File Format is Not Supported In other words, SharePoint and OneDrive don't have a Block Download button because the platforms do not support blocking video downloads. The good news is that Microsoft confirmed they're working on adding Block Download for other file types.


1 Answers

If you replace the word redir with download in the url you get the raw file instead of the webpage i.e.

https://onedrive.live.com/download?resid=DBBC281099F4FE69%21646

like image 187
Michael Avatar answered Nov 15 '22 02:11

Michael