[Nitro] Blobs, Pictures and Og
chris.farmiloe at farmiloe.com
Sat Oct 8 05:47:54 EDT 2005
blob types can be specified using Og::Blob (a kind of pretend type to
allow the binary types in database)
so define your type as
property :image_data, Og::Blob
this works fine using postgres (as a bytea) and I remember getting it
working with sqlite too as a bytea is effectivly just a really massive
as for image resizing the only lib I have seen so far is RMagick
also remember that when you write your view method to render the
images you will have to set the content-type (using
before sending all the image data or browsers won't know what to do with
On Oct 7, 2005, at 20:46, Michael Fellinger wrote:
I've got a quite interesting question about a problem i want to solve.
I want to build a simple gallery using nitro/og, without storing paths
and all the stuff, having the images as objects, using a nitro-page
with the fitting header for displaying.
Done this in php before with almost no effort, but now i just can't
figure that out in og.
How would you store an image in og? (and creating thumbnails for them
on the fly)
would you just use the path pointing to the thumbnail and the image?
is there the possibility to do that via a blob, and if there is - how
would you that?
Nitro-general mailing list
Nitro-general at rubyforge.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Nitro-general