May 19 2022 04:16 AM
Dear all,
Does anyone know how can I get that link? Please see the below attached the red arrow pointing.
The reason why I asking is because, I create the button at SP home page, to make user easy to download the form. I have managed to created the download button in form tab, but not the home page, and I notice, if I can put the download hyper link to the home page, can hit my end goal.
Will be grateful for any help u can provide.
Thanks & Regards.
May 19 2022 05:58 AM
Hi @Sk-73 ,
you can right click on the file than Copy link. You can generate the link if you want to share outside or inside.
But also you can copy path. Right click, details and under More details copy path. see below.
May 19 2022 06:54 AM
HI @Adin_Calkic Thanks! Tomorrow I will try again. I have tried many different ways, but the issue is if I right-click the file and then copy the link, then I paste the link into the home page it will just open the file in the browser, not download the file.
May 19 2022 07:00 AM
May 19 2022 07:51 PM
Hi@Adin_Calkic Thanks. Sorry to tell u, but copy the path, the link I paste to the homepage when I click on the hyperlink on the homepage, still opens the doc in the browser.
I found an article and this work for me. SharePoint Online: Link to Force Download a Document Instead of Open in browser Just would like to share with u.
Cheers 👍
May 20 2022 02:27 AM - edited May 20 2022 02:33 AM
@Sk-73 the download button in the library is a JSON-formatted button. Create a single line of text column and select Format this column and choose Advanced mode. Then paste in the following JSON changing anything to taste:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "button",
"style": {
"border-radius": "5px",
"margin": "1px",
"padding": "0px",
"visibility": "=if([$ContentType] == 'Folder', 'hidden', 'visible')"
},
"children": [
{
"elmType": "a",
"txtContent": "Download",
"style": {
"text-decoration": "none",
"padding": "10px 0px",
"width": "100%",
"color": "white",
"background-color": "Teal"
},
"attributes": {
"href": "= @currentWeb + '/_layouts/15/download.aspx?UniqueId=' + [$UniqueId]",
"target": "_blank"
}
}
]
}
Rob
Los Gallardos
Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)
May 20 2022 04:10 AM