文件上传修改

GitlabVersion
nwb 11 years ago
parent f22a39fbfa
commit 5d22bc5510

@ -163,7 +163,7 @@ class FilesController < ApplicationController
end end
end end
# 返回定资源类型的资源列表 # 返回定资源类型的资源列表
# added by nwb # added by nwb
def getattachtype def getattachtype
sort_init 'created_on', 'desc' sort_init 'created_on', 'desc'

@ -84,9 +84,11 @@ module Redmine
def save_attachments(attachments, author=User.current) def save_attachments(attachments, author=User.current)
# 清除临时文件 # 清除临时文件
tempAttach = attachments[:dummy] if attachments
if tempAttach && tempAttach[:file] tempAttach = attachments[:dummy]
attachments.delete(:dummy) if tempAttach && tempAttach[:file]
attachments.delete(:dummy)
end
end end
if attachments.is_a?(Hash) if attachments.is_a?(Hash)

Loading…
Cancel
Save