From 0cff5a45a219141d3ebc36a1c401d5e1731c7cf0 Mon Sep 17 00:00:00 2001 From: Raphael Date: Mon, 23 Aug 2010 15:02:28 -0700 Subject: [PATCH] Deleting gridfs controller --- app/controllers/gridfs_controller.rb | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 app/controllers/gridfs_controller.rb diff --git a/app/controllers/gridfs_controller.rb b/app/controllers/gridfs_controller.rb deleted file mode 100644 index 538eb5b79..000000000 --- a/app/controllers/gridfs_controller.rb +++ /dev/null @@ -1,15 +0,0 @@ -class GridfsController < ActionController::Metal - def serve - gridfs_path = env["PATH_INFO"].gsub("/images/", "") - begin - gridfs_file = Mongo::GridFileSystem.new(MongoMapper.database).open(gridfs_path, 'r') - self.response_body = gridfs_file.read - self.content_type = gridfs_file.content_type - rescue - self.status = :file_not_found - self.content_type = 'text/plain' - self.response_body = "File totally imaginary #{gridfs_path}" - end - end - -end