Forum Discussion

rhiheu's avatar
rhiheu
Copper Contributor
Apr 12, 2023

Document cards - click to download

Hi,

Is it possible to edit the JSON in the Gallery > Document Card Designer so that clicking the card downloads the file?

Thanks for your help.

  • rhiheu It is possible to generate link to download files using SharePoint JSON formatting.

     

    Refer this article: SharePoint Online: Download files using JSON Formatting 


    Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

    For SharePoint/Power Platform blogs, visit: Ganesh Sanap Blogs

    • rhiheu's avatar
      rhiheu
      Copper Contributor

      ganeshsanap thanks for your reply, sorry but I think that's only for column formatting? I'm looking for Gallery JSON (Document Card Designer).

      • rhiheu The JSON given in blog post is for column formatting. But, you can use same logic to build link in specific format as shown in blog post inside your JSON view formatting.

         

        You cannot achieve this using SharePoint default card designer, you will have to use Advanced mode for JSON customizations.

         

        If you can share the current JSON you are using in your view, I can help you with modifying it to download the file on click. Most probably you will have to remove defaultClick action and add anchor element instead of it.


        Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

        For SharePoint/Power Platform blogs, visit: Ganesh Sanap Blogs

Resources