Forum OpenACS Development: Re: xoWiki and images

Collapse
15: Re: xoWiki and images (response to 1)
Posted by Dave Bauer on
The best option and simplest to implement, is to allow upload of an image and to associate the image directly to the object being edited.

The way I have been doing this lately is to add the image to the content repository and then set the parent_id of the cr_item for the image to the object being edited.

This is much simpler than trying to guess which file storage instance to use. I guess the only issue would be defining a URL for this type of image. We could use the /o/ object redirector for this.

Collapse
Posted by Gustaf Neumann on
i was considering something like this for xowiki itself, to allow e.g. wikipdeia style names withing the wiki folders (like image:dave.png). From the datamodel is see that parent_ids of item_ids are just acs_objects, therefore, also a forum message should be fine. in some cases it is useful to associate an image (file) with an object, in some cases it is useful to associate it with a folder (in the xowiki case: one might like to use the image in multiple pages, or not to erase it, when the page containing it is removed)... the file selector will only be used when a folder is specified, otherwise the uploaded content could be directly associated with the object_id.... this is certainly interesting to think about this in more detail.