China Naming Network - Company naming - How to limit the size and type of uploaded files?

How to limit the size and type of uploaded files?

There are two ways,

1, judged in the background with the fileupload control.

File upload 1.filecontent.length determines the size.

System. Io.path.getextension (fileupload1.filename) to get the file suffix.

2. Upload the control with jquery, and you can directly judge the type and size.

In addition, js can also judge the file type in the foreground, but it can't get the file size, so it needs to refer to the plug-in.