W3C home > Mailing lists > Public > www-forms@w3.org > January 2009

Re: treating (multiple) attached images

From: Erik Bruchez <ebruchez@orbeon.com>
Date: Fri, 9 Jan 2009 12:05:01 +0800
Message-Id: <A6EBDC1F-3541-413B-94C9-542306D7B74E@orbeon.com>
To: xforms <www-forms@w3.org>

> 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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:22:15 GMT