cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conal Tuohy" <Conal.Tu...@vuw.ac.nz>
Subject RE: How to add metadata to a binary response?
Date Mon, 06 Jun 2005 21:43:16 GMT
Greg Hance wrote: 

> We have a few pipelines that use custom Cocoon readers that 
> we also need to return metadata with - the output of these 
> pipelines are binary and return various image formats (JPEG, 
> GIF) and also some PDFs. The problem is that we also need to 
> return some metadata along w/ these requests.
> 
> Has anyone ever done something like this or have any ideas? 
> The only idea I can think of would be to actually convert the 
> binary object into Base64 or something and serialize it as 
> XML along w/ some metadata also in XML. These seems a little 
> roundabout though.
> 
> Another idea I had was to maybe HTTP response metadata / 
> directives but the only problem w/ that is that I wouldn't 
> know how to handle setting something in the response (or 
> might not have an opportunity) if the request was cached.

Why? What is consuming these outputs? 

If you expect people to use their browser to view a JPEG, for instance,
then you'll have to serialise it as a JPEG won't you? 

Maybe you could consider using the ZipSerializer to create a zip file
containing your binary file and a manifest file (like a JAR file, for
instance).

Con

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message