开发者

asp.net mvc c# image upload page crashing

开发者 https://www.devze.com 2023-01-12 11:46 出处:网络
i a开发者_如何学运维m uploading an image ,when uploading image of a very large size the application crashes . i am checking the image size as well . but uploading image of a very large size bypass eve

i a开发者_如何学运维m uploading an image ,when uploading image of a very large size the application crashes . i am checking the image size as well . but uploading image of a very large size bypass everything and crashes the application. What do u people suggest? what is the best practise?


ASP.NET's default max upload file size is 4MB. To upload larger files you need to add the following configuration in web.config file:

<system.web>
  <httpRuntime executionTimeout="240" maxRequestLength="10240" />
</system.web> 

This will set max file upload size to 10MB. You can also use it in location tag to apply the configuration only on specific directory.

0

精彩评论

暂无评论...
验证码 换一张
取 消