Index: openacs-4/packages/general-comments/www/file-download.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/file-download.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/general-comments/www/file-download.tcl 14 Jun 2001 19:52:22 -0000 1.2 +++ openacs-4/packages/general-comments/www/file-download.tcl 31 Oct 2001 20:42:07 -0000 1.3 @@ -16,18 +16,4 @@ # check for permissions ad_require_permission $item_id read -# get the mime_type for the item -if { ![db_0or1row get_mime_type { - select mime_type - from cr_revisions - where revision_id = content_item.get_live_revision(:item_id) -}] } { - ad_return_complaint 1 "The item_id does not refer to a valid file attachment." -} - -ReturnHeaders $mime_type - -db_write_blob get_file " - select content - from cr_revisions - where revision_id = content_item.get_live_revision($item_id)" +cr_write_content -item_id $item_id