Package org.alfresco.repo.web.scripts
Class MimeTypeUtil
java.lang.Object
org.alfresco.repo.web.scripts.MimeTypeUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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
-
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 requestreq
- request relating to the filemimetypeService
- MimetypeService- Returns:
- mimetype of the file as a string
-