cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rbn_nue
Resolver I
Resolver I

How to allow instant download pdf files stored in SPO from canvas app?

Hi Folks,

 

I have a button in my canvas app which is part of a gallery. The gallery holds items from a collection (SPO list). The button holds the attachment of item. It displays the attachment name and onSelect should download it. 

 

rbn_nue_0-1659704581410.pngrbn_nue_1-1659704606953.png

 

This works fine for word or excel documents like .doc, .xlsx etc. But when a pdf file is present, instead of downloading, it opens in browser with SharePoint URI shown in the URL section.

 

rbn_nue_2-1659704819083.png

 

 

Could anyone help me to force download the pdf file without directly opening from SPO exposing the backend URL, or any method to encrypt the URL?

 

Thank you. 

1 ACCEPTED SOLUTION

Accepted Solutions
rbn_nue
Resolver I
Resolver I

I was able to solve this issue by referring to below post:

 

https://powerusers.microsoft.com/t5/Building-Power-Apps/Downloading-files-from-Sharepoint-in-PowerAp...

 

Thanks @v-qiaqi-msft 

 

Although in my case I was storing attachments in list items and was able to use the absolute URI of the attachment (SourceUrl=" & ThisItem.AbsoluteUri) which download the file directly. 

 

Cheers. 

View solution in original post

1 REPLY 1
rbn_nue
Resolver I
Resolver I

I was able to solve this issue by referring to below post:

 

https://powerusers.microsoft.com/t5/Building-Power-Apps/Downloading-files-from-Sharepoint-in-PowerAp...

 

Thanks @v-qiaqi-msft 

 

Although in my case I was storing attachments in list items and was able to use the absolute URI of the attachment (SourceUrl=" & ThisItem.AbsoluteUri) which download the file directly. 

 

Cheers. 

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (1,448)