[thelist] File upload filter (via Javascript) before submitting a form?

SED sed at sed.is
Tue Dec 23 19:28:50 CST 2003


Is there any way to test (and filter) the file input before submitting the
form? I want to allow the user to upload image files within certain size and
formats e.g. 200k jpeg or gif. However, the JavaScript objects for the file
input seems to be very limited (probably for security reasons). I know how
to get the filename and test if it has correct extension but I want to get
MIME type and size to - is it possible?

Regards,
SED



More information about the thelist mailing list