Configure files and images in offline canvas apps
This article explains how to configure files and images in a Power Apps table for offline canvas apps.
Prerequisites
Have an existing canvas app with Dataverse tables. For more information, see Build an app.
View column properties for a file or image
Sign in to Power Apps.
In the left navigation menu, select Tables. If the item isn’t in the side panel pane, select …More and then select the item you want.
Select the table that has the columns you want to view.
Under Schema, select Columns.
Select the Display name of a column where Data type is set to File or Image.
The column properties show the Data type. Expand Advanced options to view the maximum size for a file or image. For more information about columns, see Columns overview.
Download options
In an offline-enabled canvas app, there are two ways to download files and images:
- On view: Downloaded when you view them—the default option.
- On sync: Downloaded during offline sync when device is connected.
Download files and images on view
When files and images are configured to download on view, the content is downloaded on the device when the user opens a file or when an image is presented to the user. Files and images are downloaded when the device is connected to the network and can be used afterward without connectivity.
This mode is enabled by default without any specific configuration.
If you want to keep this default, then you don't need to proceed with this article.
Download files and images on sync
When files and images are configured to download on sync, they're downloaded during the offline sync when the device is connected. The user can access the content without connectivity and is notified when the download of the files and images is completed. On sync is recommended if you don't need to download a large number of files or images.
The remainder of this article helps you configure on sync.
Configure on sync
Prerequisites - mobile offline profile
To configure the automatic download of files and images on sync, you need to create a custom, mobile offline profile in the Power Platform admin center.
Enable offline access to images and files
You can add both the Image Descriptor and FileAttachment tables to your mobile offline profile by configuring the settings of your environment.
Go to Power Platform admin center and sign-in as an admin.
Select Environments from the navigation menu.
Choose an environment and then select Settings on the menu bar.
Expand Users + permissions, then select Mobile configuration.
Select a mobile offline profile to edit it.
In the Data available offline section, select Add table.
Proceed with adding image columns and file columns.
Add image columns to mobile offline with Image Descriptor
In your mobile configuration setting, you can add the Image Descriptor table to enable image downloads.
Select Image Descriptor and then select Next.
Under Choose the rows that you want to make available offline, select Related rows only.
Expand Relationships and select Column name: Display name for each column where Data type is set to Image. In this example, we select the unnamed column names from the DemoTable1 and DemoTable3 tables.
Select Save.
Add file columns to mobile offline with FileAttachment
In your mobile configuration setting, you can add a FileAttachment table to enable file downloads.
Select FileAttachment and then select Next.
Under Choose the rows that you want to make available offline, select Related rows only.
Expand Relationships and select Column name: My column name for each column where Data type is set to File. In this example we add Column name: MyFile from the DemoTable3 table.
Don't select Column name: Regarding..
Select Save.