Forum OpenACS Development: Configuration and Usage Info Needed

Collapse
Posted by Roger Metcalf on
I'm exploring my shiny new 4.6 install, picking pieces I need for a modest corporate intranet (proof of concept is required for approval), and thought I'd start for Forums, Notifications, File-Storage and Attachments.  But I'll be darned if I can figure out how to configure attachments.  I realize it originated with dotLRN and have looked there for information also.

I've succeeded in getting a "Would you like to attach a file to this message" option when creating message in a forum, but selecting it gives "Error: empty folder_id" from forum/attach/attach.

Questions:
1) How do I get the entry into attachment_fs_root_folder_map that seems to be needed by attachments to find its storage?  Is there a UI trick, a manual step, a required site map configuration or what?
2) A link to the (singleton) instance of Attachments must be present under every forum instance that wants to use attachments; and that link must be named "attach".  Is that right?
3) A link to some instance of File Storage must be mounted under every forum instance (as a sibling to attach) that wants to use attachments.  That URL may have any name.  Is that right?
4) Is there any documentation on the correct way to configure/use Attachments?

Thanks, and I'm looking forward to experiencing all the 4.6 progress.

Collapse
Posted by Michael Steigman on
1) How do I get the entry into attachment_fs_root_folder_map that seems to be needed by attachments to find its storage? Is there a UI trick, a manual step, a required site map configuration or what?

Attachments configuration is manual at this point. The steps would be:
1) instantiate (or pick an existing instance of) file storage
2) determine the root_folder_id of the instance
3) determine the package_id for the package you'd like attachments enabled for
4) manually insert the row:

insert into attachment_fs_root_folder_map 
(folder_id, package_id) 
values 
(:an_fs_root_folder_id, :package_id_for_which_you_want_attachments);

2) A link to the (singleton) instance of Attachments must be present under every forum instance that wants to use attachments; and that link must be named "attach". Is that right?

Yes.

3) A link to some instance of File Storage must be mounted under every forum instance (as a sibling to attach) that wants to use attachments. That URL may have any name. Is that right?

You can map any fs root folder to any attachments package. All instances of attachments on your system can use the same file storage instance if you like.

4) Is there any documentation on the correct way to configure/use Attachments?

Umm... I guess there is now ;)

Seriously, though - this info came from a brief chat with with Arjun Sanyal (who wrote the attachments package) a couple of months ago. Hopefully he'll correct me if anything I said is incorrect.

I don't know if there are any plans to create a UI for this configuration step but package developers could take care of this configuration work in thier _post_instantiation package init procs.
Collapse
Posted by Roger Metcalf on
Thanks, adding a row to the attachments_fs_root_folder_map table was all it took.  A candidate for package documentation (other than in this forum), I'd say!
Collapse
Posted by Arjun Sanyal on
thanks for taking a swing at this michael :)

there is documentation for attachments in the HEAD of
cvs (/attachments/www/doc/). i don't know if it got into 4.6 or not

Collapse
Posted by Roger Metcalf on
Arjun, I didn't see your reply till I was done replying...  great, from now on I'll look in HEAD too for documentation before complaining 😉
Collapse
Posted by Roger Metcalf on
Hey, the attachments documentation still isn't tagged with oacs-4-6.