Forum .LRN Q&A: Re: Hidden .LRN dependencies

Collapse
Posted by Dave Bauer on
Malte,

There is a reasoning behind using file-storage to manage attachments. Basically it allows one to attach already uploaded file, and attach the same file to multiple objects without uploading more than once.

The dependecy of dotlrn is strange. There is a mapping between attachments using packages and file-storage. That is, your forums package instance with attacments enabled would be mapped to a file storage root folder in the table attachments_fs_root_folder_map.

It should be easy enough to get the folder_id from that package instance in attach.tcl.

In file-add-2.tcl you should be able to do the same thing by finding the direct parent package and getting the related file storage from the same table.

It appears that dotLRN should map the attachments to the root folder it needs in the service contracts that create the forums and attachments in a community. See this commit:
http://cvs.openacs.org/cvs/openacs-4/packages/attachments/www/attach.tcl?r1=1.7.2.2&r2=1.7.2.3

If that is reverted, I think it will behave as you expect.

Adding a UI to enable attachments is a great idea.