Multi language and side bar update

This commit is contained in:
Harry Bomrah authored and chris committed 2012-08-20 23:14:11 +08:00
1 parent e27c1b0175
commit 1ba87982ba
6 files changed
+23 -1

No files matched your search

+1 -1
View File
@@ -3,7 +3,7 @@ require 'mongo'
class GridfsController < ActionController::Metal
def serve
gridfs_path = env["PATH_INFO"].gsub("/gridfs/", "").force_encoding("UTF-8")
gridfs_path = (params[:path]+'.'+params[:format]).gsub("/gridfs/", "").force_encoding("UTF-8")
begin
gridfs_file = Mongo::GridFileSystem.new(Mongoid.database).open(gridfs_path, 'r')
self.response_body = gridfs_file.read