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>
I need a check for images (jpg, jpeg, gif, png)
. When there is an image, an alert message should say: "You are trying to upload an image. Please use the image uploader"
.
Note: The image-check should start directly after the file is selected and not after the form is submitted.
Is this possible with jQuery?
I tried many solutions without success. Thank you!