How to check file size on upload

后端 未结 6 1010
别那么骄傲
别那么骄傲 2020-12-08 11:22

Whats the best way to check the size of a file during upload using asp.net and C#? I can upload large files by altering my web.config without any problems. My issues arises

6条回答
  •  误落风尘
    2020-12-08 12:17

    We are currently using NeatUpload to upload the files.

    While this does the size check post upload and so may not meet your requirements, and while it has the option to use SWFUPLOAD to upload the files and check size etc, it is possible to set the options such that it doesn't use this component.

    Due to the way they post back to a postback handler it is also possible to show a progress bar of the upload. You can also reject the upload early in the handler if the size of the file, using the content size property, exceeds the size you require.

提交回复
热议问题