jeudi 9 avril 2015

jquery alert on file upload for image

A simple file upload



<dl>
<dt><label for="fileupload">{L_FILENAME}:</label></dt>
<dd>
<input type="file" name="fileupload" id="fileupload" maxlength="{FILESIZE}" value="" />
</dd>
</dl>


need a check for images (jpg, jpeg, gif, png). When there is a image, a alert message should say: "You are try to upload a image. Please use the image uploader".


Note: The image-check should start direct after the file is selected and not when submited the form. Is this possible with jquery?


I tried many solutions without success. Thank you!


Aucun commentaire:

Enregistrer un commentaire