raise Upload failed event..

Hi ,
I am using upload component in my application to upload image files, its working great ,but i want to allow user to upload only Image files, so i planed to raise upload failed event while user want to upload other than image files.please tell me how to write code for this…:*).

Thanks
Mukthyar

Hi,

you might want to implement com.vaadin.ui.Upload.StartedListener. From the event you can get the filename which has the extension. If the extension is not valid you can call interruptUpload() on the Upload component.

-Tepi

Hi,Tepi Dear
Thanks a lot, for immediate response and solution for my upload problem.I Implemented your solution its working great.:lol:

thanks
Mukthar:lol: