rails3, gridfs and mongomapper: how to serve files? send_data?

Posted by z3cko on Stack Overflow See other posts from Stack Overflow or by z3cko
Published on 2010-03-21T17:16:23Z Indexed on 2010/03/21 17:21 UTC
Read the original article Hit count: 513

Filed under:
|
|
|
|

i am currently developing a rails3 app with mongomapper and file storage in gridfs. after some trying around, i found grip and currently also use it in the app for storing the data. so far, so good - now i am trying to get my head around serving the files to the user -- what would be the best/fastest way to achieve that?

from: http://railstips.org/blog/archives/2009/12/23/getting-a-grip-on-gridfs/

there seem to be 2 ways:

  • send_data from ruby/rails - is this a recommended way? fast enough? (i want to use passenger in the deploy setup)
  • writing a rails metal (see http://gist.github.com/264077) - any comments or hints on how to use that with rails3?

any other ideas or even examples? thanks a lot!

© Stack Overflow or respective owner

Related posts about rails3

Related posts about gridfs