Class MimeTypeUtil

java.lang.Object
org.alfresco.repo.web.scripts.MimeTypeUtil

public class MimeTypeUtil extends Object
  • Constructor Details

    • MimeTypeUtil

      public MimeTypeUtil()
  • Method Details

    • determineMimetype

      public static String determineMimetype(ContentReader reader, org.springframework.extensions.webscripts.WebScriptRequest req, MimetypeService mimetypeService)
      Get the file mimetype from the file ContentReader, and if its null then set the mimetype to binary by default and try to get the correct one from file extension
      Parameters:
      reader - reader of the file in the request
      req - request relating to the file
      mimetypeService - MimetypeService
      Returns:
      mimetype of the file as a string