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):
%3 test_test_cr_items test_cr_items (test xotcl-core) cr_check_mime_type cr_check_mime_type test_test_cr_items->cr_check_mime_type test_xotcl_core_tutorial_4 xotcl_core_tutorial_4 (test xotcl-core) test_xotcl_core_tutorial_4->cr_check_mime_type cr_filename_to_mime_type cr_filename_to_mime_type (public) cr_check_mime_type->cr_filename_to_mime_type db_0or1row db_0or1row (public) cr_check_mime_type->db_0or1row parameter::get parameter::get (public) cr_check_mime_type->parameter::get content::item::new content::item::new (public) content::item::new->cr_check_mime_type content::revision::new content::revision::new (public) content::revision::new->cr_check_mime_type fs::add_file fs::add_file (public) fs::add_file->cr_check_mime_type fs::add_version fs::add_version (public) fs::add_version->cr_check_mime_type xo::db::CrItem instproc save xo::db::CrItem instproc save (public) xo::db::CrItem instproc save->cr_check_mime_type

Testcases:
xotcl_core_tutorial_4, test_cr_items
[ show source ]
Show another procedure: