In the code below, how will I find the mime type of the file that just got saved in File
object?
File fileBase = new File("classpath:test");
try {
FileUtils.copyURLToFile(
new URL(docUploadDto.getAssetFileUrl()),
fileBase);
} catch (MalformedURLException e) {
responseDto.setMessage("Malformed URL : "+e.getMessage());
responseDto.setStatus("500");
return responseDto;
} catch (IOException e) {
responseDto.setMessage("IO Error : "+e.getMessage());
responseDto.setStatus("500");
return responseDto;
}
My docUploadDto.getAssetFileUrl()
can download any kind of File.