开发者

is it possible to check the filesize of a file before uploading it?

开发者 https://www.devze.com 2023-03-20 06:38 出处:网络
i am trying to upload a file to the webserver in my asp.net mvc 2 webapplication. This only开发者_开发问答 works when the file size is less than 102Mb.

i am trying to upload a file to the webserver in my asp.net mvc 2 webapplication. This only开发者_开发问答 works when the file size is less than 102Mb.

This is my setting in the web.config:

<configuration>
<system.web>
    <httpRuntime maxRequestLength="102400" />
</system.web>

can i check before i upload my file what the filesize is so it wont throw an error when it reaches over the limit?


You may checkout the following blog post. You can check the file size on the client using some of the file upload plugins out there (Uploadify, plupload, ...).

0

精彩评论

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