Package org.alfresco.repo.web.scripts
Class MimeTypeUtil
- java.lang.Object
-
- org.alfresco.repo.web.scripts.MimeTypeUtil
-
public class MimeTypeUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description MimeTypeUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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
-
-
-
Method Detail
-
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
-
-