When building Power Pages portals, you may run into file size limits, especially when uploading large downloadable files or adding complex external JavaScript files. Depending on the upload method (like XrmToolBox or Power Platform CLI), you might see different error messages, all typically pointing to the same issue: the file is too large.
Fortunately, since web files are stored as attachments in Dataverse, you can increase the file size limit by adjusting the attachment settings.
First, navigate to Advanced settings > Administration > System settings.
Under the email tab, update the file size limit for attachments to the desired value (in KB).
For example, if you want the maximum limit to be 10 MB, set the value as 10240 (since 1 MB = 1024 KB).

Note
This setting only works with the standard data model in Power Pages. The enhanced data model does not use attachments to store the web files and has a fixed web file size limit of 128 MB.