[Zope] Return image from Python Script

Jens Vagelpohl jens at dataflake.org
Tue Dec 14 10:08:06 EST 2004


>  return context.image_file.data
>
>  
>
> BTW, this is a case where file extensions complicate things.

No it doesn't. It just forces you to write it a little differently. 
Like so:

#################
image = getattr(context, 'image.gif')

return str(image.data)
#################

jens



More information about the Zope mailing list