SOLVED

Links to Sharepoint documents set to download

Deleted
Not applicable

Previously in Sharepoint (mere weeks ago), I was able to change links to Sharepoint documents to set to download, instead of having the document open in a browser.

 

I would change the URL containing "guestaccess.aspx" to "download.aspx".

 

However, when I now retrieve a link to a document from Sharepoint, it looks very different (and shorter).

 

It looks like the following:

https://www.website.com/:x:/s/IntraActive/Path/Document-code

 

The URL no longer contains "guestaccess.aspx", I therefore am not able to set the document to download. 

 

Does anyone have any ideas?

36 Replies

Hi Christopher,

 

I'm using an "Anyone" link for external access. After I disabled short URLs, the syntax is as follows. I removed the protocol so this site doesn't format it as a real link.

 

//company-my.sharepoint.com/personal/mariocajina_company_com/_layouts/15/guestaccess.aspx?docid=1234567890&authkey=AUth_Key_x

 

EDIT: I'm trying links to individual files. I tried to a PDF and to a PPTX.

Well, for some reason, now they work for me by appending &download=1 to the "short link." I tried it with a PPTX, and a ZIP file.

 

EDIT: I spoke too soon. I tried it now using a link from a SharePoint site, and I got a "This link has been removed" message page.

 

So, it worked from my OneDrive for Business, but not from a SharePoint Team site that allows external sharing. This isn't good. It's the latter scenario that we want to use more.

If your link is to a document you can do this. Remove everything after the document extension and add this ?web=0. 

@Nicholas English Did you figure this out by any chance? I'm facing the same request from one of my clients and can't figure out how to make an external link downloadable

Hi Chani,
Sadly no, I really hoped I could. That said I’m finding the speed of SP quite slow, I’m guessing it’s because of the permissions rather than anything else.
Sadly no Chani
Also performance wise the platform is slow, I’m guessing because the file path is strewn with access rights.

it worked with the &download=1

:)

the &download=1 works fine on Chrome.

But we switched to Microsoft Edge (Chronium). And there it just opens the file instead as read only. (Without downloading first). Any one know something that works on Edge? 

@Herland Bjørnsbror We are having the same issue (albeit using web=0), seems like this approach is a little hacky.

@Greg_Hitchon Found a general solution :)

In sharepoint library, right click on the file, download file, CTRL + J, Then right click file and copy link. Use that link for download only in a webpage.

I got the download link as following:

 

-right click in the document that is in the lybrary

-download

-then click in the 3 dots of the downloaded file

-click in: copy download link

 

Fernando_Chagas_1-1594779647475.png

 

 

@Herland Bjørnsbror Yep this works. For any others the unique ID can be found via CSOM easily.

This works!
This works in Chrome.
This does NOT look like Chrome - is it Edge?

The URL i got from this process (copy download link) looks like this.

site url/_layouts/15/download.aspx?SourceURL=encoded url starting after sharepoint.com

Here's an example of an encoded URL that would work in the box above. It has a leading slash(%2F).
%2Fsites%2FSITE%2DNAME%2DWITH%2DSPACES%2FLIBRARY%2FFile%5FName%5FWith%5FUnderscores%2Ezip