cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nvrhughes
Frequent Visitor

Download Image from SQL Server

We have an app that uploads images to a SQL server and displays them within the app. 

 

The user needs to be able to download the selected image in a gallery to their local device. 

 

Is this possible to do from the app or flow? 

5 REPLIES 5
EricLott
Resident Rockstar
Resident Rockstar

In Flow you can use the OneDrive connector to save images to your OneDrive. See below

flowExample.png

The tricky part is the File Content. How are you storing the image in SQL?

I believe it is of binary type. @EricLott 

 

0x89504E470D0A1A0A0000000D49484452000.....

@nvrhughes 

That's good. That's what Flow expects.

@EricLott This hexadecimal value that @nvrhughes showed is how the image is stored in SQL Server, but when accessing it on PowerApps it turns into a value like this
"appres://datasources/'Your DataSourceName'/table/'Your Table Name'/rows/'Row Number'/inline/'Your Image Column Name'".
So when using the method you showed saves a text like this on a file.
I'm trying to find workarounds but without success... Any other ideas?

Giole
Frequent Visitor

Hi

I encountered the same issue and got your results.

So I tried to retrieve the Image File stored in SQL directly from SQL and not from Powerapps. It works like a charm

 

first "get the row (V2)" via ID from SQL, then "create file" in OneDrive using the column from SQL.
works for me

 

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,017)