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 {