diogob / carrierwave-postgresql

Use PostgreSQL large objects (AKA BLOBs) to store your files inside the database
http://diogob.github.com/carrierwave-postgresql/
MIT License
56 stars 25 forks source link

Is file.open required? #3

Closed yasirs closed 11 years ago

yasirs commented 11 years ago

I am storing files:

u = User.new
u.avatar = params[:file]
u.save!

and retreiving files like this:

u = User.find(:first)
data = u.avatar.read

Is u.avatar = File.open('somewhere') required as in the Readme?

diogob commented 11 years ago

Not really, it was just a convenient way to show that a file object reference is needed.