public interface MediaTypeResolver
For using customized class for content-type
ZK default will be used, if not implemented.
Specify the library property of org.zkoss.util.media.MediaTypeResolverImpl.class
in zk.xml to provide a customized class for content-type. (since 7.0.1)
Should first specify the library property of org.zkoss.web.util.resource.dir in zk.xml, the files in this path will get content-type by the customized class.
For example, if the value of org.zkoss.web.util.resource.dir
in zk.xml is "/WEB-INF/cwr", and src in your zul should be set as "~./yourfile.jpg".
it will load "yourfile.jpg" from "/WEB-INF/cwr", and will use your customized class for content-type.
Modifier and Type | Method and Description |
---|---|
java.lang.String |
resolve(java.lang.String format)
Returns the content-type of the specified format for the specified filename extension,
or null if not found.
|
Copyright © 2005-2022 Potix Corporation. All Rights Reserved.