How to Download Files from the Page Library in SharePoint Online

sharepointuser-5603 160 Reputation points
2025-01-21T09:00:53.9033333+00:00

In the SharePoint Online, what are the steps to download files from the page library? I cannot find the download button.

Microsoft 365 and Office | SharePoint | Development
0 comments No comments
{count} votes

Accepted answer
  1. Emily Du-MSFT 51,846 Reputation points Microsoft External Staff
    2025-01-22T02:02:24.5333333+00:00

    Here is a method for you:

    1.Create a text column.

    2.Select the column -> Column settings -> Format this column -> Use following codes.

    {
      "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
      "elmType": "button",
      "style": {
        "border-radius": "5px",
        "margin": "5px 0px",
        "padding": "0px",
        "visibility": "=if([$File_x0020_Type] == '', 'hidden', 'visible')"
      },
      "attributes": {
        "class": "ms-bgColor-themePrimary"
      },
      "children": [
        {
          "elmType": "a",
          "txtContent": "Download",
          "style": {
            "text-decoration": "none",
            "padding": "10px 0px",
            "width": "100%"
          },
          "attributes": {
            "href": "= @currentWeb + '/_layouts/15/download.aspx?UniqueId=' + [$UniqueId]",
            "target": "_blank",
            "class": "ms-fontColor-white"
          }
        }
      ]
    }
    

    3.Result. Then click download button to download files.

    User's image


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.