Showing results for 
Search instead for 
Did you mean: 
New Member

File Attachment Functionality With On Premises SQL Server in PowerApps

Hello everyone,

                          I had a requirement that using On Premises SQL server i want the attachment functionality in PowerApps edit form so that i can attach any file such as Pdf,Word,excel etc and stored it in SQL table and display against the same record whenever i browse the app.

After doing alot of research i didn't find a way to do this except for storing and displaying image as it is the only supported feature with On premises SQL server. I also found that Sharepoint has a functionality to attach any file with records and it can also integrate with powerapps but i want to use both SQL and Sharepoint in the app.

Is it possible to save file on Sharepoint and its public URL in SQL table record so that whenever i open the app and browse for that record considering sql as datasource, it should load the attachment from sharepoint through that public URL?


The challenge is that the customers have their existing ecosystems with their databases etc. where one must adapt to. I, as a cosultant, am using PowerApps to implement small scale apps for them to run spesific tasks in their processes. Sometimes this leads to a situation where i just can't use the best PA practices. I really like PA and it's very cost and time effective, but i think that Microsoft should generally put a bit more efforts to develope it further.


BTW:   Shane, thanks for the great Zebra-videos! For example using a varchar to save image in PA really made difference.


Frequent Visitor

Is this still the case in 2021 @Shanescows - SQL isn't recommended for file storage, and utilize Azure Blog or SharePoint

Super User
Super User

@RickJ if licensing is not a problem, I think Azure Blob storage remains the best technical solution (store the image/file in Azure Blob storage and store the URL to the image/file in the SQL DB).

If you are benefiting from the SQL 'Grandfathered' licensing then you won't want to go the Azure Blob storage route as that would require premium licensing for every App user. In that case, SharePoint would likely be a better option, though I believe you will need to utilize a Flow to get the image from Power Apps and into SharePoint.

You can store images/files in SQL, it just that it is not 'tuned' to that sort of workload (so not the best performance) and database storage is generally more expensive than file storage. When Power Apps pulls the image data from SQL I believe it needs to pull all the full image data before rendering the record, whereas with a URL, the row can render while the image is still being downloaded via the URL.

That is all true. However, because you are required to navigate to a direct file in Power Automate instead of being able to dynamically select a file location this severely limits your ability to store files in an organized manner. It also forces you to require unique file names. In my example, I have three real estate managers all saving documents that in turn need to be added as an attachment to an approval. The file names are actually determined by the client, and cannot be changed, so they all have to have say Exhibit A for example. Cannot save multiple Exhibit As in the same file.

Helpful resources

2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,598)