or continue reading…
Files in Power Apps – Knowledge Reminder
Power Apps does not have ready-made solutions for handling files. The standard form allows us to add a file as an attachment to a SharePoint list. To transfer the file from the list attachments to the document library, we need to use Power Automate.
If we create a new or copy an existing file in a SharePoint document library, we also need to use Power Automate
CCurrently, Power Automate is the primary tool that allows us to perform file operations in Power Apps
PPower Automate gives us two options: using standard functions for a given connector or calling SharePoint REST API
What and how we test?
- Create a copy of the file using the SharePoint REST API
- use of function – Send an HTTP request to SharePoint
- use of function – Send an HTTP request to SharePoint
- File Copy Using Power Automate #1
- use of function – Get file content oraz Create file
- use of function – Get file content oraz Create file
- File Copy Using Power Automate #2
- use of function – Copy file
- use of function – Copy file
- I use a specially prepared application for tests
- Each operation is performed 10 times and the average of 10 measurements is taken as the result
- The procedure is repeated for different file sizes
We do not test the operation of uploading the file to the library to avoid the impact of network speed on the test. We only check server-side operations.
Test application
1After selecting the file, the application places the file in the SharePoint library using the SharePoint REST API
Read:
ADDING A FILE TO THE LIBRARY USING THE SHAREPOINT REST API
2Then it repeats the procedure for creating a copy of the file with the Power Automate function 10 times: Get Content, Create File and Copy file
Test results
Average results for different file sizes
File size | REST API Copy | Get Content & Create File | Copy File | |||
---|---|---|---|---|---|---|
20kb | 0,6 s | 598 ms | 3 s | 2951 ms | 8,1 s | 8122 ms |
40kb | 0,6 s | 580 ms | 3,1 s | 3078 ms | 8 s | 8023 ms |
4mb | 0,6 s | 611 ms | 5,5 s | 5452 ms | 8 s | 8025 ms |
18mb | 0,7 s | 673 ms | 9,4 s | 9372 ms | 8 s | 7973 ms |