I want to allow users uploading files with a filesize not more than 5 MB. How can I check the filesize of a file that a user selected, before or when beginnning the upload ?
@pyroMar 25.2003 — #No, you are going to need to use the server side language that you are using to handle the file upload. If it is PHP, I can help you...What are you using?
[B]No, you are going to need to use the server side language that you are using to handle the file upload. If it is PHP, I can help you...What are you using? [/B][/QUOTE]
@pyroMar 25.2003 — #Ok, basically what you will want to do is check the file size. Take a look at this:
[code=php]if ($inputfile_size <= 5000000) # $inputfile is the name of your form field that handles the files { #upload code here } else { echo ("File size must be 5 MB or less"); }[/code]