public boolean isValidMimeType ( String mimeType ) { if ( mimeType == null ) { return false ; } else if ( mimeType . indexOf ( ";" ) != - 1 ) { return mimetypes . contains ( mimeType . split ( ";" ) [ 0 ] ) ; } else { return mimetypes . contains ( mimeType ) ; } }
check the mimetype is referenced in the mimetypes database