I have developed a small program to import data from excel into my application database. Everything is working just fine but when I deploy this to my Linux server, I get exception when I try to upload data from Excel.
Here is the snapshot of the location that the file is saved temporarily where it is reading from. This snapshot is from my local machne (Mac).
Here is the xml
<fileStorageUploadField id="fileUploadMaterialBtn"
acceptedFileTypes=".xlsx, .xls" fileStoragePutMode="MANUAL"
fileNameVisible="true"/>
Here is the controller
if (event.getReceiver() instanceof FileTemporaryStorageBuffer buffer) {
UUID fileId = buffer.getFileData().getFileInfo().getId();
File file = temporaryStorage.getFile(fileId);
if (file != null) {
try {
inteaccMdDataMigrationServiceBean.importMaterialMasterDataFromExcel(file);
md_MaterialImpsDl.load();
notifications.create("Material master data Import is done..").show();
} catch (IOException e) {
throw new RuntimeException(e);
}
temporaryStorage.deleteFile(fileId);
}
}
I have checked the log files but nothing was obvious where is this error coming from?
Is it related to the access to the directory? Any support would be appreciated.