Tuesday, January 19, 2016

OneDrive 2016 Direct File Download URL Maker







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)



  1. Goto OneDrive (https://onedrive.live.com/)
  2. Upload you file

  3. Right-click to "Embed" your uploaded file 

  4. Click Generate HTML Button.

  5. Copy and Paste HTML Code to Notepad

  6. 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).
  7. Paste (crtl-v) the file link into OneDrive Embed Link textbox above and click "Get Download Url" button. Proceed as usual.
  8. Right-click and "Copy" or simply press ctrl-c keys to copy the link to your clipboard.
  9. Now Paste (ctrl-v) the OneDrive Share Direct Download Link in emails to share!
  10. Done!

API Change for Images 



  1. Right-click to "Share" your uploaded file

  2. Pop-up will appear and choose "Get a link", click "Create link" dark blue button.
  3. Right-click and "Copy" the highlighted link.  Updated June 07, 2016 API change.
  4. 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.


     
  5. Resulting url looks like this  https://onedrive.live.com/redir?resid=8F99649728BEB2F3!2727&authkey=!ADUKO0q7Bz-CpW4&ithint=photo%2cjpg
  6. Paste link into OneDrive Share Link textbox and click "Get Download Url" button.
  7. Right-click and choose "Select all" and "Copy".
  8. Paste the OneDrive Share Direct Download Link in emails instead.
  9. "Shorten link" was a feature in the old API windows now gone, June 07, 2016.  This is done by default now.

  10. OR for image only 
  1. 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

PDF files approx. over 100Mb in size, do not preview in Chrome, and you get a splash page to "For the best experience, open this PDF portfolio in Adobe Acrobat or Adobe Reader"

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
It should look something like URL above and must contain the required file id (resid), authentication key (authkey) and file type (ithint). We'll use this link to get a direct file download.




 
OneDrive for Business File Share Link is the download link by default;)


Bonus : For images, read Using OneDrive as a Content Delivery Network (CDN)

13 comments:

  1. Thank you so much! God bless!

    ReplyDelete
  2. Thank 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

    Can 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

    ReplyDelete
    Replies
    1. Good news from the ONEDRIVE API demo, you don't need the above process. You are specify the direct download link.
      https://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

      Delete
    2. If you choose Web Link, you get the a link that looks like the above!

      Delete
  3. I 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.

    ReplyDelete
    Replies
    1. Thanks you for bring the API change to my attention. Update blog post.

      Delete
    2. Erm 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.

      Delete
    3. Ah sorry please ignore my other message the api changed again and I hadn't realised.

      Delete
  4. Awesome website. Saved my day. God bless you

    ReplyDelete
  5. woohoo.. thanks...

    i have been dealing with slow hosters for so long... thankyou for this mate..

    ReplyDelete
  6. Fabulous idea! Unfortunately my share link does not start with https://OneDrive as seen here: https://1drv.ms/u/s!Aqcm...

    ReplyDelete
    Replies
    1. Paste into http://www.linkexpander.com/ and copy that URL.

      Delete