Introduction: In this blog, we will understand how to enable file attachment on a basic(entity) form in the PowerApps portal.
This blog covers below topics:
- Overview of the “Attach a file” option and attribute details related to it.
- Storing File Attachment in Notes
- Storing files in Azure Blob Storage
- Allow only PDF files for Upload
Steps to be followed:
- Open the Portal Management App.
- Open the entity form on which you want to enable file attachment.

- Go to “Addition Settings” tab
- Attach File: Enable Attach File option.
- Attach File Storage Location: Select the Attach file storage Location you can store the file as a Notes attachment or in Azure Blob storage.
- Attach File Save Option: Select Notes or Portal Comments to save file attachments. For notes attachments, select Notes.
- Accept MIME Types: specify a list of accepted MIME types.
- Allow Multiple Files: Select this if you want to allow multiple files to upload.
- Accept File Types: This option is available only when using the Portal Comment option for Attach File Save Option. Allows you to specify a list of accepted file types.
- Label: You can specify the custom label for File Attachment.
- Attach File Required: Select this to make it required.
- Required Error Message: You can specify a custom error message for the required file error.
- Restrict Files To Accepted Types: Select this if you want to restrict the file to the selected type only.
- File Type Error Message: You can specify a custom error message if a user uploads an incorrect file type.
- Maximum File Size (in kilobytes): Specify the maximum size of a file that can be attached.
- File Size Error Message: You can specify a custom error message if a user uploads a large file than specified.
Example for storing File Attachment in Notes
- Select “Note Attachment” as “Attach File Storage Location“.
- Select “Notes” as “Attach File Save Option“.

- Save the record and go to your portal you should see the “Upload files”(Attach a file) option.

- After uploading files you can see those files in the “Notes” section.


Example for storing files in Azure Blob Storage
- Select “Azure Blob Storage” as “Attach File Storage Location“.
- Select “Notes” as “Attach File Save Option“.

- Save the record, go to your portal and upload the file.

- You can see that the File is stored in Azure Blob storage.


Allow only PDF files for Upload
- Enter “application/pdf” in Accepted MIME Types.

- Select the “Restrict Files to Accepted Types” option.
- Enter a custom error message in the “File Type Error Message” field that will come when a user uploads any other file type.

- save the record, go to your portal and upload any other file type than PDF.

- You can see your custom error message will popup.

- When the user will upload PDF files they will get uploaded successfully as shown below.


POINTS TO BE NOTED:
- Entity (Table) must be enable for attachments. (Enable Attachments)

- User must have entity permission for notes(annotations).

Read my blog on how to configure Azure Storage in PowerApps Portal: