logo
search
Others

How to Preview Uploaded Files Instead of Downloading in Power Apps

Steve KSteve K Sep 30, 2026 869 views

Question details

The user needs to display uploaded attachments inline within Power Apps instead of the default behavior that automatically downloads the files.

How to Preview Uploaded Files in Power Apps
Product
Power Apps
Device & OS
not provided
Scenario
Configuring app user interfaces to display attachment previews inline.
Observed behavior
The default attachment control automatically downloads uploaded files to the device instead of rendering a preview within the application.
Before you start

Ensure you have edit access to the app in Power Apps Studio and note that native preview controls currently only support specific file types, such as images and PDFs.

Solution 1Recommended

Use Gallery and Native Viewer Controls

By pairing a Gallery control with a PDF viewer or Image control, you can intercept the attachment data and display it directly on the screen.

This method replaces the standard attachment download behavior by passing the attachment's value to a compatible viewer control within your app.

1
Insert a Data Gallery

Open your app in Power Apps Studio. Navigate to the screen with your attachment field, insert a new Gallery control, and set its Items property to 'ThisItem.Attachments'.

2
Add a Viewer Control

From the Insert menu, add an Image control (for picture formats) or a PDF viewer (for document formats) to your screen.

3
Bind the Viewer to the Gallery

Select the newly added viewer control. Set its main data property (the 'Image' property for images, or the 'Document' property for PDFs) to reference the selected gallery item, such as 'GalleryName.Selected.Value'.

Use Gallery and Native Viewer Controls
File Type Limitations: Power Apps does not have a universal preview function. Unsupported formats like Word or Excel documents cannot be natively previewed this way and may require conversion via Power Automate.
Free Microsoft Office alternative

Easily Open Downloaded Power Apps Attachments

Since Power Apps cannot natively preview Word, Excel, or PowerPoint files and forces them to download, WPS Office is the perfect lightweight companion to open these files instantly. It provides an intuitive, all-in-one interface to view and edit your downloaded documents without a heavy subscription.

  1. 1. Install WPS Office: Download and install the free WPS Office suite on your computer or mobile device.
  2. 2. Set as Default Viewer: Configure WPS Office as your default application for opening Office documents and PDFs.
  3. 3. Open Downloaded Files: Whenever Power Apps downloads an unsupported attachment, simply click the file to instantly open and view it in WPS Office.
Free, lightweight, and fast document viewer for everyday tasksFully compatible with Microsoft Office formats (.docx, .xlsx, .pptx)Built-in PDF reader for quick form and report viewingFamiliar tabbed user interface for seamless workflow
microsoft office alternative - wps office

Frequently Asked Questions

Why does the Power Apps attachment control download files instead of opening them?

The default attachment control is natively designed to trigger a browser download action using the file's URL. To preview files inline, you must explicitly use dedicated viewer controls like the PDF Viewer or Image control mapped to the attachment data.

Can I natively preview Word or Excel files in Power Apps?

No, Power Apps does not currently offer native viewer controls for Word documents or Excel spreadsheets. You will need to either allow them to download, use a Power Automate flow to convert them to PDF for viewing, or integrate a custom PCF component.

How do I dynamically switch between image and PDF previews?

You can add both an Image control and a PDF viewer to your screen. Then, set their 'Visible' properties dynamically using a formula that checks the file extension string (e.g., EndsWith(Gallery.Selected.Name, ".pdf")) of the selected attachment.