book.setUploadedCoverImage(fileUploadItem);
deleteFiles(files);
}
public String getBookImageFileSize() {
Book book = Faces.var("book", Book.class);
FileUploadItem uploadedCoverImage = book.getUploadedCoverImage();
if (uploadedCoverImage == null) return "N/A";
FileUploadStatus status = uploadedCoverImage.getStatus();
switch (status) {
case SUCCESSFUL:
return String.valueOf(book.getBookCoverImage().getFileSize());
case STOPPED:
return "<Upload stopped>";
case FAILED:
return "<Upload failed>";
case SIZE_LIMIT_EXCEEDED: