Link to File and Automatically Download

Anonymous
2024-09-17T17:05:05+00:00

Hi,

I'm using Webparts and trying to link to a file that's stored in Sharepoint and have it only download, not open in browser.

I have changed the link to have ?download=1 instead of ?web=1, but the Webpart appends &web=1 to the end of my link anyway

ex.

sharepoint.com/site/SiteName/example%file.xlsx?download=1

becomes

sharepoint.com/site/SiteName/example%file.xlsx?download=1**&web=1**

Things that do not solve my issue:

  1. Telling people to File > Save As > Download a Copy
  2. Linking to the Sharepoint folder and editing the JSON of the name column to auto-download

I'm not sure why when I link to something I can't just link directly to it and instead Microsoft gets to change it. Why offer me the ability to hyperlink if it's not going to use my hyperlink?

Any help is appreciated.

Microsoft 365 and Office | SharePoint | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Anonymous
    2024-09-18T05:18:58+00:00

    Dear User,

    Thank you for reaching out Microsoft 365 community. To get the file "download" instead of "open", please modify the download URL like below.

    https://<yourdomain>.sharepoint.com/sites/<yoursite>/_layouts/download.aspx?SourceUrl=<document-URL>

    Eg.

    https://contoso.sharepoint.com/sites/siteA/_layouts/download.aspx?SourceUrl=https://contoso.sharepoint.com/sites/siteA/Shared%20Documents/sample.xlsx

    For the <document-URL>, please locate the file on sharepoint > right click it > Details > scroll to bottom and copy path.

    We are committed to ensuring you have a smooth experience with Microsoft 365 products, and we appreciate your patience and understanding as we work through this challenge.

    If there is anything further we can assist you with in the meantime, please do not hesitate to reach out.

    Best regards,

    Sophia

    2 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2024-11-18T11:29:41+00:00

    Hello Sophia,

    and is there a way to create a link for automatic download from teams from the link that is for all the company users?

    Three dots >> Copy Link >> Settings >> only people from the organization

    I need to find a way to automatically allow downloading such file without granting access to the Teams.

    &download=1 does not work for me (the file opens but doesn't download itself).

    Thanks :)

    2 people found this answer helpful.
    0 comments No comments