views:

80

answers:

1

Hi,

I would like to perform a check on the name of a file being uploaded via richfaces fileupload component. I would like to check this as soon as the user selects the file. A file with a wrong name, should not appear in the list, and an alert() should be called specifying the filename was not correct.

Is there a way to check the add event, and to interrupt it when the filename is not correct?

A: 

It's possible but you would need to write your own JavaScript function to check that. You could use onupload event to call the function.

Max Katz

related questions