How to share Large Files in Email


//copyright 2017, metadataconsulting.ca //Jquery included in blogger.com $(document).ready(function(){ $(“#onedriveembedbutton”).click(function(){ document.getElementById(“answer”).value=””; // is Valid onedrive share link? //https://onedrive.live.com/redir?resid=8F99649728BEB2F3!2737&authkey=!ACnO8wuwLQ07PqI&v=3&ithint=photo%2cgif var stringURL = document.getElementById(“textboxSearch”).value; //alert(‘validateOneDrive: strigURL = ‘ + stringURL); var stringOneDrive = “https://onedrive.live.com/”; var stringOneDriveResid = “&resid=”; var stringOneDriveAuthKey = “&authkey=”; var download = “”; if (stringURL.indexOf(stringOneDrive)==0 && stringURL.search(stringOneDriveAuthKey)>-1){ //alert(document.getElementById(“answer”).value+”-“); // alert(stringURL.replace(‘redir’, ‘download’)); download = stringURL.replace(‘redir’, ‘download’); download = download.replace(’embed’, ‘download’); document.getElementById(“answer”).value = download; $(‘answer’).val(download); //make sure $(‘#directtest’).html(‘New! Test your direct download link: ‘+ download+’‘); document.getElementById(“textboxSearch”).value = “”; document.getElementById(“answer”).select(); $(‘answer’).select(); //make sure }else{ if (stringURL.indexOf(stringOneDrive)!=0) alert(‘Not a valid OneDrive Shared Link, does not contain ‘ + stringOneDrive); else if (stringURL.indexOf(stringOneDriveAuthKey)!=0) alert(‘Not a valid OneDrive Shared Link, does not contain authentication key string ‘ + stringOneDriveAuthKey); document.getElementById(“answer”).value = “”; } //alert(‘validateOneDrive: isValid = ‘ + isOneDrive); //var isValid = confirm(‘Do you want to submit the form?’); //alert(‘validateMyForm: isValid = ‘ + isValid); //return false; }); $(“#iframesrcget”).click(function(){ var frametext = $(“#iframeText”).val(); var srcURL = $(frametext).attr(‘src’); $(“#iframeText”).val(srcURL); $(“#iframeText”).select(); }); $(“#iframesrcgetTop”).click(function(){ var frametext = $(“#iframeTextTop”).val(); var srcURLTop = $(frametext).attr(‘src’); $(“#iframeTextTop”).val(”); //$(“#iframeTextTop”).val(srcURLTop); //$(“#iframeTextTop”).select(); $(“#textboxSearch”).val(srcURLTop); }); });

I get asked all the time to by my clients to provide a way to direct download URL to a file and NOT preview the file, especially if the file is large in email. It’s often very confusing for novice users to have preview mode of file, such as PDF files which launch a separate user interface. Moreover, if the file is over 100Mb, the preview appears too slowly for most users, and they’ll abandon the file.


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.

This will produce, extract the File Embed Link which looks like: https://onedrive.live.com/embed?cid=8F99649728BEB2F3&resid=8F99649728BEB2F3%211010&authkey=AFo8ZQ_-qj84DEQ and populate the text-box below. To proceed click “Get Download Link” button.



4. Now, Click on Get Download Link button.


Text-box 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 detailed instructions



  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=”https://onedrive.live.com/embed?cid=…” >…</iframe> and paste into  above.
  7. Done!


For Images, you have to do an extra step


  1. Right-click to “Share” your uploaded file

  2. Click Copy button. Updated Jan 01, 2017 API change.


    This will produce a share URL that looks like this, 

    https://1drv.ms/i/s!AvOyviiXZJmPlSc1CjtKuwc_gqVu

  3. Paste share URL into http://www.linkexpander.com/ and copy that URL. 

    The resulting Uncovered URL is in the format we need, and look like this.

    https://onedrive.live.com/redir?resid=8F99649728BEB2F3!2727&authkey=!ADUKO0q7Bz-CpW4&ithint=photo%2cjpg

  4. Paste “Uncovered URL” link into 3.1 OneDrive File Embed Link text-box above
    and click 4. “Get Download Link” button above.
  5. Right-click and choose “Select all” and “Copy”.
  6. Paste the OneDrive Share Direct Download Link in emails instead.
  7. Done

OR for images only

    1. Updated June 07, 2016 API change!

      Right-click on image and select Embed. The Copy the URL to embed image now gives you direct download URL, but is super long.

      So you do not need to do the above! 

    Using OneDrive as a CDN


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

    A note about Sharing PDFs

    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.





Source: http://metadataconsulting.blogspot.com/

Be the first to comment

Leave a Reply

Your email address will not be published.


*