This article will demonstrate how to create a link to download the file instead of a default link - to open it.
TABLE OF CONTENTS
- Before we begin
- Prerequisites
- Step 1. Edit ShortPoint File Lists design element
- Step 2. Prepare the URL string:
- Step 3. Map Link field with URL Path
- Step 4. Paste the link URL
- Step 5. Update ShortPoint File Lists design element
- Result
Before we begin
- The solution explained in this article works for Office 365, SharePoint 2019, SharePoint 2016 and SharePoint 2013 environments.
- You can use the following solution both for static and dynamically connected ShortPoint design elements.
In this example we are using ShortPoint File Lists design element dynamically connected to a SharePoint document library. You may use any other design element with a link option.
Notes:
- Check our ShortPoint Connect: Basic Tutorial for more details on how the connection works.
- You may use static way of creating ShortPoint design elements, and paste the URL links to the files manually. Please, check this article: Adding, Duplicating, Moving and Deleting ShortPoint Elements.
Prerequisites
- You have ShortPoint design element with links.
- You have files/documents in your SharePoint document library.
Step 1. Edit ShortPoint File Lists design element
Edit the page. Click the cog wheel icon to open File Lists' settings.
The Settings tab will open.
Step 2. Prepare the URL string
Copy the following URL:
http://spsite/_layouts/download.aspx?SourceUrl=
Substitute spsite part with your site URL. In our case it will look like this:
http://mycompany.sharepoint.com/_layouts/download.aspx?SourceUrl=
http://mycompany.sharepoint.com/_layouts/download.aspx?SourceUrl=
Step 3. Map Link field with URL Path
Switch to the Items tab.
Map the Link field with the URL Path option from the drop down, as shown below:
Note: if you are using static links, instead of mapping you will need to paste it manually.
Step 4. Paste the link URL
Paste the modified URL before the mapped option:
Note: For static links you will have a complete URL Path to the file. For example, the complete URL link will look like this:
Step 5. Update ShortPoint File Lists design element
Click Update button.
Then, save the page.
Result
That's it. Now when we click the link, it will download the file.
Related articles:
- How to Map File Type Icons for Document Library Files Inside Folders
- How to Map Document / File Type Icon when Using SharePoint Document Library REST API
- How to Show Both Files and Folders of the Document Library in your ShortPoint Element
- How to Show Only Recent Documents in ShortPoint Element
- Horizontal Alignment for ShortPoint Lists