Updated: Since the original posting, Microsoft introduced storage in SharePoint from Power Apps Portal. I updated the post to reflect current support.-jt
In portal scenarios, you may have a requirement to allow users to submit or view file attachments such as grant or credit applications, presentations, photographs and other files. This blog post introduces some options for where and how these file attachments are stored and accessed.
Microsoft supports three methods for storing file attachments in the Portal. They are as file attachments in the Dynamics entities, SharePoint and Azure Blob Storage.
Store File Attachments in Dynamics
Storing file attachments in the Dynamics Notes entity or other entities is the default option in Dynamics 365, and is familiar to Dynamics 365 users. These files may be accessed through the Dynamics Portal. When files are attached in Dynamics Portal, they look something like this:
Source: https://community.dynamics.com/crm/b/crminogic/archive/2017/10/04/attach-documents-from-microsoft-dynamics-365-portal |
Azure Blob Storage
Microsoft recently introduced support for Azure Blob Storage in Dynamics Portal. You can choose Azure storage in Dynamics Portal when you configure the page to which the files are associated, such as web forms and entity forms. Here are step-by-step instructions for enabling Azure storage in the portal. You can also configure Dynamics 365 forms to use Azure storage:
Note that the paper-clip icon has been replaced with a cloud icon which denotes that this file is stored in Azure Storage. You can continue to store attachments in Dynamics 365 which will be indicated with the paperclip icon.
SharePoint File Storage
Microsoft supports SharePoint storage for attachments in Power Apps Portal.
Microsoft also supports SharePoint storage of Dynamics 365 for users of the application as well as the portal. The Microsoft SharePoint integration for file attachments creates folders which correspond to the associated entities in Dynamics.
Tradeoffs
With all these choices, what are the factors that will drive your decision? Here are some considerations and tradeoffs:
Dynamics Notes Attachments
|
Azure Blob Storage
|
SharePoint
|
|
Supported by Microsoft
|
Yes
|
Yes
|
Yes
|
Files Stored in Dataverse
|
Yes
|
No
|
No
|
Performance
|
Highest
|
||
Storage cost
|
Higher
|
Lowest
|
Depends on SharePoint cost
|
Full Text File Search
|
Not supported but metadata searchable
|
Requires additional service
|
Included
|
If you store documents in Azure Blob Storage or SharePoint, these repositories are managed independently. They are not backed up or migrated inside the Power Apps solution itself. This offers an advantage of you want to access the files outside the context of Power Apps.
The cost and performance tradeoffs are most relevant for customers with large volumes of file attachments.