forum::markdown_image::mime_type (private)

 forum::markdown_image::mime_type path

Defined in packages/forums/tcl/markdown-image-procs.tcl

Recognize supported bitmap images from the uploaded bytes.

Parameters:
path (required)

Partial Call Graph (max 5 caller/called nodes):
forum::markdown_image::drafts forum::markdown_image::drafts (private) forum::markdown_image::mime_type forum::markdown_image::mime_type forum::markdown_image::drafts->forum::markdown_image::mime_type packages/forums/www/markdown-image-upload.tcl packages/forums/ www/markdown-image-upload.tcl packages/forums/www/markdown-image-upload.tcl->forum::markdown_image::mime_type packages/forums/www/markdown-image.tcl packages/forums/ www/markdown-image.tcl packages/forums/www/markdown-image.tcl->forum::markdown_image::mime_type

Testcases:
No testcase defined.
Source code:
    if {![file isfile $path] || [catch {ns_imgtype $path} type] || $type ni {png jpeg gif}
        || [catch {ns_imgsize $path} size] || [llength $size] != 2
        || [lindex $size 0] <= 0 || [lindex $size 1] <= 0} {
        return ""
    }
    return image/$type
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: