Skip to content

Commit 782f3f3

Browse files
authored
Update code example in File Upload topic (#18424)
1 parent 6ea70cf commit 782f3f3

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

aspnetcore/mvc/models/file-uploads.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -640,14 +640,14 @@ For apps hosted by Kestrel, the default maximum request body size is 30,000,000
640640
```csharp
641641
public static IHostBuilder CreateHostBuilder(string[] args) =>
642642
Host.CreateDefaultBuilder(args)
643-
.ConfigureKestrel((context, options) =>
644-
{
645-
// Handle requests up to 50 MB
646-
options.Limits.MaxRequestBodySize = 52428800;
647-
})
648643
.ConfigureWebHostDefaults(webBuilder =>
649644
{
650-
webBuilder.UseStartup<Startup>();
645+
webBuilder.ConfigureKestrel((context, options) =>
646+
{
647+
// Handle requests up to 50 MB
648+
options.Limits.MaxRequestBodySize = 52428800;
649+
})
650+
.UseStartup<Startup>();
651651
});
652652
```
653653

0 commit comments

Comments
 (0)