diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index fe3c3272a..960bc61e6 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -265,6 +265,10 @@ class AttachmentsController < ApplicationController @history.save #历史记录保存完毕 #将最新保存的记录 数据替换到 需要修改的文件记录 @old_attachment.attributes = @attachment.attributes.dup.except("id","container_id","container_type","is_public","downloads", "quotes") + # 如果附件描述被修改,则保存附件 + unless params[:description] == @attachment.description + @old_attachment.description = params[:description] + end @old_attachment.save #删除当前记录 @attachment.delete diff --git a/app/views/attachments/_show_attachment_history.html.erb b/app/views/attachments/_show_attachment_history.html.erb index fb2afd308..edb3ef17e 100644 --- a/app/views/attachments/_show_attachment_history.html.erb +++ b/app/views/attachments/_show_attachment_history.html.erb @@ -39,6 +39,14 @@ +
+ +
+ +
+
+
+
(未选择文件)
您可以上传小于50MB的文件