Skip to content

Commit 88c21fc

Browse files
committed
docs: clarify AI Management upload hosting limits
1 parent 6de8a21 commit 88c21fc

1 file changed

Lines changed: 61 additions & 0 deletions

File tree

docs/en/modules/ai-management/index.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,67 @@ The options class also provides helper methods:
432432
> [!NOTE]
433433
> Adding new file extensions also requires a matching content extractor to be registered for document processing. The built-in extractors support `.txt`, `.md`, and `.pdf` files.
434434
435+
#### Hosting-Level Upload Limits
436+
437+
`WorkspaceDataSourceOptions.MaxFileSize` controls the module-level validation, but your hosting stack may reject large uploads before the request reaches AI Management. If you increase `MaxFileSize`, make sure the underlying server and proxy limits are also updated.
438+
439+
Typical limits to review:
440+
441+
* **ASP.NET Core form/multipart limit** (`FormOptions.MultipartBodyLengthLimit`)
442+
* **Kestrel request body limit** (`KestrelServerLimits.MaxRequestBodySize`)
443+
* **IIS request filtering limit** (`maxAllowedContentLength`)
444+
* **Reverse proxy limits** such as **Nginx** (`client_max_body_size`)
445+
446+
Example ASP.NET Core configuration:
447+
448+
```csharp
449+
using Microsoft.AspNetCore.Http.Features;
450+
451+
public override void ConfigureServices(ServiceConfigurationContext context)
452+
{
453+
Configure<WorkspaceDataSourceOptions>(options =>
454+
{
455+
options.MaxFileSize = 50 * 1024 * 1024;
456+
});
457+
458+
Configure<FormOptions>(options =>
459+
{
460+
options.MultipartBodyLengthLimit = 50 * 1024 * 1024;
461+
});
462+
}
463+
```
464+
465+
```csharp
466+
builder.WebHost.ConfigureKestrel(options =>
467+
{
468+
options.Limits.MaxRequestBodySize = 50 * 1024 * 1024;
469+
});
470+
```
471+
472+
Example IIS configuration in `web.config`:
473+
474+
```xml
475+
<configuration>
476+
<system.webServer>
477+
<security>
478+
<requestFiltering>
479+
<requestLimits maxAllowedContentLength="52428800" />
480+
</requestFiltering>
481+
</security>
482+
</system.webServer>
483+
</configuration>
484+
```
485+
486+
Example Nginx configuration:
487+
488+
```nginx
489+
server {
490+
client_max_body_size 50M;
491+
}
492+
```
493+
494+
If you are hosting behind another proxy or gateway (for example Apache, YARP, Azure App Gateway, Cloudflare, or Kubernetes ingress), ensure its request-body limit is also greater than or equal to the configured `MaxFileSize`.
495+
435496
## Permissions
436497

437498
The AI Management module defines the following permissions:

0 commit comments

Comments
 (0)