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

  1. Sign in to Power Apps.

  2. 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.

  3. Select the table that has the columns you want to view.

  4. Under Schema, select Columns.

  5. Select the Display name of a column where Data type is set to File or Image.

  6. 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.

  1. Go to Power Platform admin center and sign-in as an admin.

  2. Select Environments from the navigation menu.

  3. Choose an environment and then select Settings on the menu bar.

  4. Expand Users + permissions, then select Mobile configuration.

    Screenshot that shows where the mobile configuration setting is located in your environment settings.

  5. Select a mobile offline profile to edit it.

  6. In the Data available offline section, select Add table.

  7. 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.

  1. Select Image Descriptor and then select Next.

    Screenshot that shows where to select the Image Descriptor table.

  2. Under Choose the rows that you want to make available offline, select Related rows only.

  3. 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.

    Screenshot that shows the Image Descriptor table settings.

  4. 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.

  1. Select FileAttachment and then select Next.

    Screenshot that shows how to add the FileAttachment table.

  2. Under Choose the rows that you want to make available offline, select Related rows only.

  3. 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..

    Screenshot that shows how to edit the FileAttachment table.

  4. Select Save.