Index: openacs-4/packages/attachments/www/file-add-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/attachments/www/file-add-2.tcl,v diff -u -N -r1.9 -r1.10 --- openacs-4/packages/attachments/www/file-add-2.tcl 31 Jan 2018 20:32:52 -0000 1.9 +++ openacs-4/packages/attachments/www/file-add-2.tcl 6 Dec 2018 13:49:38 -0000 1.10 @@ -46,7 +46,11 @@ set creation_ip [ad_conn peeraddr] set root_folder [attachments::get_root_folder] -set fs_package_id [db_string get_fs_package_id {}] +set fs_package_id [db_string get_fs_package_id { + select package_id + from fs_root_folders + where folder_id=:root_folder +}] #db_transaction { set file_id [db_nextval "acs_object_id_seq"]