[jifty-devel] question about binary encoding
bart at bunting.net.au
Thu Mar 16 17:35:10 EST 2006
Hi once again,
I'm making progress with Jifty and I really like it so far.
I'm trying to understand what is happening to my binary data as I load it
and retrieve it from the database.
I've written a tiny app which allows you to upload images into the database
and then use the dispatcher to retrieve them by their id.
I now have the uploading working and the dispatcher is serving the file back
However, somewhere in the middle I'm guessing it's being escaped or encoded
in some way. The file I get back is aprox twice the size of the one I
Can someone tell me what may be happening here? Is it safe to upload binary
data straight into the database or do I need to base64 encode it before?
In my image_display component I'm simply outputting the image/jpg content
type header and then using the value returned from the record. I load up
the record in the init block and use:
<% $record->image %> to display it.
I'm guessing that this is being escaped as it goes through mason or
Any pointers or suggestions would be most welcome.
More information about the jifty-devel