Created
July 31, 2013 12:49
-
-
Save ddelponte/6121697 to your computer and use it in GitHub Desktop.
How to get mimeType from file extension in Grails. Be sure to inject grailsMimeUtility into your controller or service before calling it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def mimeType = grailsMimeUtility.getMimeTypeForExtension(extension) | |
println mimeType.name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
extension is not required in unix system . then
use
file
command line :