8

I uploaded a file to a folder in

https://sitename-my.sharepoint.com/

I created a view link, requiring no access

enter image description here

The link that I get when I click on share looks something like this

https://somesite-my.sharepoint.com/personal/username/_layouts/15/guestaccess.aspx?guestaccesstoken=ayx%3d&docid=xyz&rev=1

The problem is when I open the generated url in incognito window, it opens in word online

Is there a way to change this make it download file directly?

Is there a api for this just like how onedrive has like below which will directly download the file

https://api.onedrive.com/v1.0/shares/s!code/root/content

  • Does right-click and save as work for you? – Benny Skogberg Jun 22 '16 at 11:35
  • that will require sign-in I guess, I need a download link for anonymous access – Vignesh Subramanian Jun 22 '16 at 11:37
  • basically I am using a javascript plugin, which will ask for the source of the document and download it and modify it. I want to get a link to do that – Vignesh Subramanian Jun 22 '16 at 11:38
  • Can you send the guest-link in an e-mail and right-click from there? – Benny Skogberg Jun 22 '16 at 11:38
  • No, I am not able to do that I also tried changing href in one of the links here, when I right click and save, it is coming up as a webpage – Vignesh Subramanian Jun 22 '16 at 11:44
9

To get the direct download link, you have to click on the document, get the share link which will look like below url

https://sitename-my.sharepoint.com/personal/xyz/_layouts/15/guestaccess.aspx?guestaccesstoken=xyz%3d&docid=xyz&rev=1

Now all you have to do is replace the guestacces.aspx with download.aspx, and the url should look like the one below

https://sitename-my.sharepoint.com/personal/xyz/_layouts/15/download.aspx?guestaccesstoken=xyz%3d&docid=xyz&rev=1

When people click the link the document will automatically start to download

  • 2
    This worked like a charm! – Jake Oct 9 '16 at 9:09
2

You should be able to add the query string parameter `Web=0'

For example:

https://sitename-my.sharepoint.com/personal/vignesh/Documents/SomePresentation.pptx?Web=0

2

Adding ?Web=0 worked perfectly. Thanks for your assistance.

1

There are also column settings that can add or remove the Get Link option. For instance, in the Modify View menu, the column "Name (linked to document with edit menu)" displays the ... option to select the Get Link dialog. The other Name columns do not have this option.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.