Simple File Upload to a Blob column in a SQLite DB

I have a DB that is already populated with data. There is a table
called clubs that has an logo_big field set up as a blob. I have
successfully used send_data to display the jpg pictures as I need them
in the views. I just need to setup the edit/new view to enable me to
upload the files.

I tried paperclip but that requires changing the schema of the
database which is not really an option for me.

I am looking for a simple implementation to change the image file.

I have been hunting around the "to_blob" and "send_data" parameters
with no luck. Any help with this?

The form looks fine, and your use of #read to get the file data looks
right as well.

What file/line are you getting the 'private method called' exception on?

Chris

Xenio wrote:

I have a DB that is already populated with data. There is a table
called clubs that has an logo_big field set up as a blob. I have
successfully used send_data to display the jpg pictures as I need them
in the views. I just need to setup the edit/new view to enable me to
upload the files.

If you put your image files in the database, you are asking for trouble.
I realize that you're working with a DB that already does this, but now
would be the time to remove the images from the database, put them in
the filesystem, and do further uploads to the filesystem.

I tried paperclip but that requires changing the schema of the
database which is not really an option for me.

Why not? You have a bad schema in that it is trying to store binary
data that doesn't really belong there. Change the schema.

Best,

It will be in your Sent Items or whatever it is called in your mailer.
Just go there and forward it to the list.

Colin