From: "alandacosta@..." Date: 2008-06-13T20:02:07+09:00 Subject: Re: Insert large binary file in database (MySQL) You can create a text field in your table, and convert to/from Base64/ Binary as needed. You have to do a File.open, iterating each line, and << Base64.encode64(line), to encode ; Base64.decode64(line), to decode. It's an option. I know BLOB sends, using the db adapter are a problem with Postgres when the db is non-local (not on the same machine) to the app. If you have to store the file object in your database, I'd recommend the Base64 transform. Note: storage compared to binary will increase slightly by converting to/from Base64 (even though ruby is decently fast at this), application processing time will go up due to conversions, and your DB machine may slow down somewhat (dependent on load). If you do go this route, you should md5 or sha1 hash the binary object (before transform) to save on redundantly storing objects, and rather use a join table for a user to file association, against the md5/sha1.