cr_check_mime_type (public)
cr_check_mime_type [ -mime_type mime_type ] [ -filename filename ] \ [ -file file ]
Defined in packages/acs-content-repository/tcl/revision-procs.tcl
Check whether the mimetype is registered. If not, check whether it can be guessed from the filename. If guessed mimetype is not registered optionally insert it.
- Switches:
- -mime_type (optional)
- param The mime type
- -filename (optional)
- the filename
- -file (optional)
- the actual file being saved. This option currently doesn't have any effect, but in the future would be better to inspect the actual file content instead of trusting the user.
- Returns:
- the mapped mimetype
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- xotcl_core_tutorial_4, test_cr_items