fix for 新聞與公告QA
1.8.新聞或公告的「檔案室」上傳圖片後再行編輯時,圖片無法正常顯示(但是可以正常被編輯調整並於前台顯示) 2.add 上傳檔案大小限制: 3MB 3.公告的發佈單位為何是顯示單位代碼:M00?應顯示發布單位
This commit is contained in:
1 parent
df722ba90f
commit
818c58c1ee
9 files changed
+48
-20
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user