Index: openacs-4/packages/file-storage/tcl/file-storage-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/tcl/file-storage-procs.tcl,v diff -u -r1.48.2.1 -r1.48.2.2 --- openacs-4/packages/file-storage/tcl/file-storage-procs.tcl 21 Jun 2005 21:22:12 -0000 1.48.2.1 +++ openacs-4/packages/file-storage/tcl/file-storage-procs.tcl 15 Jul 2005 14:38:54 -0000 1.48.2.2 @@ -677,13 +677,13 @@ } set mime_type [cr_filename_to_mime_type -create -- $name] - switch [cr_registered_type_for_mime_type $mime_type] { - image { - set content_type "image" - } - default { - set content_type "file_storage_object" - } + # we have to do this here because we create the object before + # calling cr_import_content + + if {[db_string image_type_p "" -default 0]} { + set content_type image + } else { + set content_type file_storage_object } db_transaction { Index: openacs-4/packages/file-storage/tcl/file-storage-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/tcl/file-storage-procs.xql,v diff -u -r1.16 -r1.16.2.1 --- openacs-4/packages/file-storage/tcl/file-storage-procs.xql 13 Jan 2005 13:58:12 -0000 1.16 +++ openacs-4/packages/file-storage/tcl/file-storage-procs.xql 15 Jul 2005 14:38:54 -0000 1.16.2.1 @@ -154,4 +154,14 @@ select storage_type from cr_items where item_id=:item_id + + + + select 1 + from cr_content_mime_type_map + where mime_type = :mime_type + and content_type = 'image' + + + \ No newline at end of file