gridfs

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

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://ra...

How to stream image object in Sinatra

I had uploaded images to mongoDB using GridFS. I want to retrieve an image from the db and display it in the browser. How to do this with the help of Sinatra and HAML. ...

mongodb gridfs carrierwave or joint or other ?

i want to store all my assets in mongo gridfs. i was trying to get carrierwave setup with mongomapper and gridfs but seems carrierwave supports mongoid now instead. I need to be able to save different size versions / cropped versions of an image so thats why i was going to use carrierwave. Currently its set up to store on file ...

GridFS in Ruby: How to upsert?

Does GridFS have an upsert? For example, if i want to save an image with a specified _id, and one with that same _id already exists, i want it to overwrite (update) it. Otherwise, insert it. Thanks! Matt ...

Is GridFS fast and reliable enough for production?

I develop a new website and I want to use GridFS as storage for all user uploads, because it offers a lot of advantages compared to a normal filesystem storage. Benchmarks with GridFS served by nginx indicate, that it's not as fast as a normal filesystem served by nginx. Benchmark with nginx Is anyone out there, who uses GridFS alrea...

Input/output error with gridfs-fuse on Mac OSX Leopard

I seem to be unable to properly mount my mongoDB database as a drive using gridfs-fuse. Here are the steps I am following: I followed the directions listed here: http://www.coffeepowered.net/2010/02/24/serving-files-out-of-gridfs-part-2/. I am running Mac OS X Leopard (64 bit) and have mongodb running and linked at /opt/mongo. Scons ru...

Fast import into MongoDb

I have around 2 million strings with different lengths that I need to compress and put into MongoDb GridFS as files. The strings are currently stored in MS SQL TEXT field of a table. I wrote a sample app to read each row, compress it and store it as a GridFS file. There is one reader and a thread pool of 50 threads storing the results....

Creating Thumbnails with GridFS + MongoDB + PHP

I'm creating a site where a client who will be selling his photography which he sells a lot of it and will probably get quite a bit of traffic. Probably around 2k-5k uniques a day. I'm using MongoDB with PHP and I read i should use GridFS to store these large files. Upwards of 2MB-5MB photos, but obviously BW will be extremely spendy (im...

MongoDB's GridFS, Rails 3, X-Sendfile, and ACL's, HOW-TO ?

I have a Rails 3 project that does file upload/download, with access rights (User has many Files, and can only read/write his own files). If I store my files on classic filesystem, I can check the access to the file in my rails app and then use X-Sendfile header to redirect to the file, if user has access. In this way, a user can neve...