Uploading BLOB into MySQL

Greetings RoR Folks,

I’ve seen lots of examples that show how to load images into MySQL
databases using RoR with the file actually sitting on the filesystem and
the file path stored in the database.

What I would like to do is upload a file (.jpg, .png, .gif, .mp3, or
.wav) into a MySQL BLOB column so that the file is not on the file
system, but rather in the MySQL database.

The problem with storing files on the filesystem is you can’t take
advantage of caching as easiliy, and you have path maintenance issues if
you move files around.

Can anyone point me in the right direction here?

Thanks!

<…>

The problem with storing files on the filesystem is you can’t take
advantage of caching as easiliy, and you have path maintenance issues if
you move files around.
<…

And there are issues when storing binary data in DB too:
http://mysqldump.azundris.com/archives/36-Serving-Images-From-A-Database.html

Regards,
Rimantas

http://rimantas.com/

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs