Reputation: 20648
Hi um facing an issue of creating a blob to a file and save it to a binary column in a postgre sql using rails . Still dont have an idea of how to start it. I would be happy if any one can tell me a way to do it.
file.each_line do |line|
line = Iconv.conv('utf-8', 'ISO-8859-1', line)
I want to save a file as Binary data (as a binary large object) and the file contains string
Upvotes: 0
Views: 315
Reputation: 18845
if you are looking for a gem that does this, carrier-wave should be helpflul: https://github.com/diogob/carrierwave-postgresql
Upvotes: 1