public static String fromResource(AbstractFileResolvingResource resource) {
        String filename = Optional.ofNullable(resource.getFilename()).orElse("");
        return getMimeType(filename);
    }
Configures and holds mappings from file extensions to MIME types.
src/main/java/spark/staticfiles/MimeType.java