Re: treating (multiple) attached images

> I'd like to allow users to attach images to an XForm. Some questions:
>
> (1) As I saw, only the file URLs are sent, not the files themselves.

If the type of the data node is xs:base64Binary, the content is made  
available as base64.

> (2) When visualizing an instance with attached images, how to present
> the images? Instead of the image URL, is it possible to show the
> image? Or a thumbnail...

With some implementations, this will work to display the image:

   <xforms:output mediatype="image/*" ref="..."/>

> (3) How to treat the case when we want to upload several images (but
> the exact number is unknown). The nicest solution would be an extra
> button "Attach another image", which would create dynamically another
> upload widget. But it also means that the XML template in the head
> part must be updated too with another tag. Any hints how to do this?

Use xforms:repeat around your xforms:upload. We have an example here:

   http://www.orbeon.com/ops/xforms-upload/

-Erik

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/

Received on Friday, 9 January 2009 04:05:45 UTC