Combination View Flat View Tree View
Threads [ Previous | Next ]
Kush Sahu
How to validate file to be uploaded?
February 7, 2013 2:58 AM

Kush Sahu

Rank: Junior Member

Posts: 25

Join Date: August 7, 2012

Recent Posts

I am working on liferay project. I have to put file upload functionality. For which I have used


But my upload method is not called when I try to upload a blank file of 0 bytes. Actually my validation for blank file is inside my upload method.
Neil Griffin
RE: How to validate file to be uploaded?
February 25, 2013 9:59 AM

Neil Griffin


Rank: Liferay Legend

Posts: 2499

Join Date: July 26, 2005

Recent Posts

I tried this with the jsf2-portlet demo the other day, and uploading a zero-byte file will cause the jsf2-portlet to catch the error and display an error message to the user.

So I would recommend that you look at the ApplicantBackingBean.handleFileUpload(FileUploadEvent) method and also there is a class in the bridge called that might be where the error message gets caught.