this.fileContent = fileContent;
}
public void upload(FileUploadEvent event) throws IOException {
UploadedFile uploadedFile = event.getFile();
if (uploadedFile.getFileName().contains(".jpg")
|| uploadedFile.getFileName().contains(".doc")
|| uploadedFile.getFileName().contains(".DOC")
|| uploadedFile.getFileName().contains(".docx")
|| uploadedFile.getFileName().contains(".DOCX")
|| uploadedFile.getFileName().contains(".PDF")
|| uploadedFile.getFileName().contains(".pdf")
|| uploadedFile.getFileName().contains(".XLS")
|| uploadedFile.getFileName().contains(".xls")
|| uploadedFile.getFileName().contains(".xlsx")
|| uploadedFile.getFileName().contains(".XLSX")
|| uploadedFile.getFileName().contains(".JPG")
|| uploadedFile.getFileName().contains(".png")
|| uploadedFile.getFileName().contains(".PNG")) {
setFileContent(uploadedFile.getContents());
setUploadedFileName(uploadedFile.getFileName());
}
}