Skip to content

Commit b3bfd64

Browse files
committed
Updated article to make it clear
1 parent 70d80ad commit b3bfd64

File tree

1 file changed

+37
-16
lines changed

1 file changed

+37
-16
lines changed

15/umbraco-cms/reference/configuration/maximumuploadsizesettings.md

Lines changed: 37 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,56 @@
22
description: "Information on how to change the default cap of upload size"
33
---
44

5-
Umbraco does not touch the default maximum allowed content size of the different services, but you can configure this yourself.
5+
# Maximum Upload Size Settings
66

7-
# Using IIS
7+
Learn how to change the upload size limit for your Umbraco site depending on your hosting setup:
88

9-
To configure the default 28.6MB upload limit using IIS, we have to create a web.config file at the root of the project. It should contain this:
9+
- [Using IIS](#using-iis)
10+
- [Hosting on Umbraco Cloud](#hosting-on-umbraco-cloud)
11+
- [Using Kestrel](#using-kestrel)
12+
13+
By default, Umbraco does not restrict upload size. The limits are controlled by the hosting platform.
14+
15+
## Using IIS
16+
17+
The default upload limit in IIS is 30000000 bytes (~28.6 MB). The maximum value allowed is 4 GB.
18+
19+
To increase the upload limit:
20+
21+
1. Create or update the `web.config` file at the root of your project.
22+
2. Add the following configuration:
1023

1124
```xml
1225
<?xml version="1.0"?>
1326
<configuration>
1427
<system.webServer>
1528
<security>
1629
<requestFiltering>
17-
<!-- ~ Below is the number of bytes allowed, 4GB is the maximum -->
30+
<!-- 2 MB in bytes -->
1831
<requestLimits maxAllowedContentLength="2000000" />
1932
</requestFiltering>
2033
</security>
2134
</system.webServer>
2235
</configuration>
2336
```
2437

25-
`maxAllowedContentLength` is specified in bytes, so this configuration would limit requests, and therefore uploaded files, to 2 megabytes
38+
`maxAllowedContentLength` is specified in bytes. For example:
39+
40+
- 2 MB = 2,000,000 bytes
41+
- 100 MB = 100,000,000 bytes
42+
- 4 GB = 4294967295 (maximum value allowed)
2643

27-
{% hint style="info" %}
28-
**Are you hosting your site on Umbraco Cloud?**
44+
## Hosting on Umbraco Cloud
2945

30-
Umbraco Cloud uses IIS for hosting. This means you need to add the setting in a `web.config` file for this to work on your Umbraco Cloud hosted sites.
31-
The upload size limit is 500mb on Umbraco Cloud.
32-
{% endhint %}
46+
Umbraco Cloud uses IIS for hosting, so changes must be made in the `web.config` file as described above. The default upload limit on Umbraco Cloud is 500 MB.
3347

34-
# Using Kestrel
48+
To customize this limit, adjust the `maxAllowedContentLength` value in your `web.config` file accordingly.
3549

36-
Runtime settings allow you to configure the `MaxRequestLength` and `MaxQueryStringLength` for kestrel. If you want to upload files larger than 28.6MB, then you have to configure these settings. If nothing is configured requests and query strings can only be the default size and smaller.
50+
## Using Kestrel
3751

38-
An example of a configuration could look something like this:
52+
Kestrel’s runtime settings allow you to configure `MaxRequestLength` and `MaxQueryStringLength`. If you want to upload files larger than 28.6MB, update these values in the `appsettings.json` file.
53+
54+
Example configuration:
3955

4056
```json
4157
"Umbraco": {
@@ -48,8 +64,13 @@ An example of a configuration could look something like this:
4864
}
4965
```
5066

51-
`MaxRequestLength` is specified in kilobytes. This configuration will limit requests, and therefore uploaded files, to 2 megabytes, and a maximum query string length of 90 characters.
67+
- `MaxRequestLength` is specified in kilobytes. For example:
68+
- 2000 KB = 2 MB
69+
- 100000 KB = 100 MB
70+
- `MaxQueryStringLength` sets the maximum number of characters in the query string.
71+
72+
## External Server Configurations
5273

53-
## [Using Nginx (external)](https://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size)
74+
### [Using Nginx (external)](https://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size)
5475

55-
## [Using apache (external)](https://httpd.apache.org/docs/2.2/mod/core.html#limitrequestbody)
76+
### [Using apache (external)](https://httpd.apache.org/docs/2.2/mod/core.html#limitrequestbody)

0 commit comments

Comments
 (0)