Microsoft OneDrive Direct File Download URL Maker
<iframe src="https://onedrive.live.com/embed?cid=8F99649728BEB2F3&resid=8F99649728BEB2F3%211010&authkey=AFo8ZQ_-qj84DEQ" width="98" height="120" frameborder="0" scrolling="no"></iframe> see instructions below, if you don't know how. NOTE : For images there an extra step below.
https://onedrive.live.com/embed?cid=8F99649728BEB2F3&resid=8F99649728BEB2F3%211010&authkey=AFo8ZQ_-qj84DEQ and populate the textbox below, click "Get Download Link" button.
4. Click on Get Download Link button.
Textbox will be highlighted so you can copy the full link. To copy, right-click and choose "Copy" or simply (ctrl-c) to copy link. Note: Entire URL is automatic selected for your convenience.
How to get a Microsoft OneDrive Embed Code (see instructions and images below)
- Goto OneDrive (https://onedrive.live.com/)
- Upload you file
- Right-click to "Embed" your uploaded file
- Click Generate HTML Button.
- Copy and Paste HTML Code to Notepad
- Copy the all the embed code ie. <iframe src="embed link"... >...</iframe> and paste into textbox here
Click Get embed link button to get the embed link and copy (ctrl-c). - Paste (crtl-v) the file link into OneDrive Embed Link textbox above and click "Get Download Url" button. Proceed as usual.
- Right-click and "Copy" or simply press ctrl-c keys to copy the link to your clipboard.
- Now Paste (ctrl-v) the OneDrive Share Direct Download Link in emails to share!
- Done!
API Change for Images
- Right-click to "Share" your uploaded file
- Pop-up will appear and choose "Get a link", click "Create link" dark blue button.
- Right-click and "Copy" the highlighted link. Updated June 07, 2016 API change.
- You should get a similar "shortened" url as this
https://1drv.ms/i/s!AvOyviiXZJmPlSc1CjtKuwc_gqVu
Paste into http://www.linkexpander.com/ and copy that URL.
- Resulting url looks like this https://onedrive.live.com/redir?resid=8F99649728BEB2F3!2727&authkey=!ADUKO0q7Bz-CpW4&ithint=photo%2cjpg
- Paste link into OneDrive Share Link textbox and click "Get Download Url" button.
- Right-click and choose "Select all" and "Copy".
- Paste the OneDrive Share Direct Download Link in emails instead.
"Shorten link" was a feature in the old API windows now gone, June 07, 2016.This is done by default now.- OR for image only
- Updated June 07, 2016 API change! Right-click Embed now gives you direct download URL! So you do not need to do the above!
Google Chrome Warning: Very large PDF files do not preview in Chrome
You have to save the file first then open in Adobe Acrobat/Reader.
- https://onedrive.live.com/redir?resid=8F99649728BEB2F3!2737&authkey=!ACnO8wuwLQ07PqI&v=3&ithint=photo%2cgif
OneDrive for Business File Share Link is the download link by default;)
Bonus : For images, read Using OneDrive as a Content Delivery Network (CDN)
You sir, are my hero.
ReplyDeleteThank you so much! God bless!
ReplyDeleteThank you so much for keeping this updated. I was reading your post here and noticed you made great effort to keep updated - http://metadataconsulting.blogspot.de/2014/05/how-to-get-direct-download-link-from.html
ReplyDeleteCan you please outline the steps on how I can create the direct link myself? I am using the one drive api to get the publicly shared link, but I cannot get the direct link as you do in this app. I posted on stackoverflow In september last year but no one repleid - http://stackoverflow.com/questions/32758239/get-link-to-embed-in-img-same-as-view-original-like-share-link?s=1|2.9436
Good news from the ONEDRIVE API demo, you don't need the above process. You are specify the direct download link.
Deletehttps://dev.onedrive.com/sdk/js-v6/js-picker-open.htm
File #1
Filename: ASCIIfy-StarFunv2.gif
File Link: https://public.bn1302.livefilestore.com/y3mYIAJ94eR729crwJ_B9nUg0m0tNn3BS5hhonaEz63xSmsEC-kF5Y-iN9poeWIj6QTiXLU3bI0xk8VKcTP5mTYras8b9F5hZ1eUH-wUcAqpA_4oWHbIkldd6KcXviMEb2wIPZV-HWcnpZryo0JES3mSkj6dZxtifzf0WqseXHDKdeV1t7g4SVWs1IluFazqTRq
Size: 2108 bytes
Link Type: downloadLink
Thumbnail Count: 3
"y3mYIAJ94eR729crwJ_B9nUg0m0tNn3BS5hhonaEz63xSmsEC-kF5Y-iN9poeWIj6QTiXLU3bI0xk8VKcTP5mTYras8b9F5hZ1eUH-wUcAqpA_4oWHbIkldd6KcXviMEb2wIPZV-HWcnpZryo0JES3mSkj6dZxtifzf0WqseXHDKdeV1t7g4SVWs1IluFazqTRq"
is the file name
If you choose Web Link, you get the a link that looks like the above!
DeleteI feel like I should mention that Onedrive recently change their share links in a way that it no longer works with this generator. I managed to get it to work by tweaking the embed code but I thought I should still try to bring it to your attention.
ReplyDeleteThanks you for bring the API change to my attention. Update blog post.
DeleteErm I don't think you quite understood me. The Embed link isn't the direct download I was just able to edit it to work with your old converter.
DeleteAh sorry please ignore my other message the api changed again and I hadn't realised.
DeleteAwesome website. Saved my day. God bless you
ReplyDeletewoohoo.. thanks...
ReplyDeletei have been dealing with slow hosters for so long... thankyou for this mate..
Fabulous idea! Unfortunately my share link does not start with https://OneDrive as seen here: https://1drv.ms/u/s!Aqcm...
ReplyDeletePaste into http://www.linkexpander.com/ and copy that URL.
Delete