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 -N -r1.42.2.24 -r1.42.2.25 --- openacs-4/packages/file-storage/tcl/file-storage-procs.tcl 18 Mar 2005 13:05:56 -0000 1.42.2.24 +++ openacs-4/packages/file-storage/tcl/file-storage-procs.tcl 15 Jul 2005 18:39:40 -0000 1.42.2.25 @@ -679,13 +679,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 {