I have a file upload component to populate a grid using the file content. I need to implement a refresh grid functionality to capture the changes in the uploaded file. The idea is to re-upload the file without manually having to browse the location. The code snippet used for uploading the file is as follows. what would be the best way to implement this?
@Override
public OutputStream receiveUpload(String filename, String encoding) {
FileOutputStream output = null;
try {
logFile = File.createTempFile("test", ".log");
output = new FileOutputStream(logFile);
} catch (IOException e) {
logger.error("Error in upload", e);
}
return output;
}