Get file’s mime-type

To get file’s mime-type I usually use tika-app-1.3.jar library. You can download it here . In this way you can use the tika library to obtein the mime-type.   public static String getMimeFromFialeTika(String nomeFile ) throws Exception {        InputStream fileStream = null ;        org.apache.tika.mime.MediaType mediaType = null ;        try {              File file = […]

Read More »

Show Buttons
Hide Buttons