We'd like to use javascript (we're using Ext) to check that the upload
file is under a size limit, and of a particular type (a .XXX extension
would be fine) before uploading.  So, of course, this would happen on
the client side, preventing unnecessary uploads to the system.

This is a general problem that has been addressed elsewhere on the web, for questions like these you should search the Ext forums and the web for answers before coming to this forum (if you haven't already).

In any case, Javascript does not yet provide a way of checking the size before the upload, so you can't do that. But you can easily check the extension by checking the filename before actually sending the Ajax post. I'm sure the user is clicking a button to initiate the upload, in your handler code do the check there.

Regards,

   Aparajita
   www.aparajitaworld.com

   "If you dare to fail, you are bound to succeed."
   - Sri Chinmoy   |   www.srichinmoy.org


_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Reply via email to