@ Override protected String getContentType ( String filePath , HttpServletRequest request ) { String requestUri = request . getRequestURI ( ) ; // Retrieve the extension String extension = getExtension ( filePath ) ; if ( extension == null ) { LOGGER . info ( "No extension found for the request URI : " + requestUri ) ; return null ; } String binContentType = ( String ) binaryMimeTypeMap . get ( extension ) ; if ( binContentType == null ) { LOGGER . info ( "No binary extension match the extension '" + extension + "' for the request URI : " + requestUri ) ; return null ; } return binContentType ; }
Returns the content type for the image