Index: openacs-4/packages/file-storage/tcl/file-storage-callback-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/tcl/file-storage-callback-procs-oracle.xql,v diff -u -r1.1.10.1 -r1.1.10.2 --- openacs-4/packages/file-storage/tcl/file-storage-callback-procs-oracle.xql 2 Jan 2016 20:13:29 -0000 1.1.10.1 +++ openacs-4/packages/file-storage/tcl/file-storage-callback-procs-oracle.xql 1 Nov 2016 17:18:46 -0000 1.1.10.2 @@ -18,7 +18,7 @@ i.storage_type as storage_type from cr_items i, cr_revisions r where r.item_id = i.item_id - and r.revision_id = :revision_id + and r.revision_id = :object_id Index: openacs-4/packages/file-storage/tcl/file-storage-callback-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/tcl/file-storage-callback-procs-postgresql.xql,v diff -u -r1.1.10.1 -r1.1.10.2 --- openacs-4/packages/file-storage/tcl/file-storage-callback-procs-postgresql.xql 2 Jan 2016 20:13:29 -0000 1.1.10.1 +++ openacs-4/packages/file-storage/tcl/file-storage-callback-procs-postgresql.xql 1 Nov 2016 17:18:46 -0000 1.1.10.2 @@ -7,18 +7,18 @@ select r.revision_id as object_id, - i.name as title, - (case i.storage_type + i.name as title, + (case i.storage_type when 'lob' then r.lob::text when 'file' then '[cr_fs_path]' || r.content else r.content - end) as content, - r.mime_type as mime, - '' as keywords, - i.storage_type as storage_type - from cr_items i, cr_revisions r + end) as content, + r.mime_type as mime, + '' as keywords, + i.storage_type as storage_type + from cr_items i, cr_revisions r where r.item_id = i.item_id - and r.revision_id = :revision_id + and r.revision_id = :object_id