Let the attachment filename be specified on upload (#12125).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10678 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
1 parent
79c1ec7adc
commit
251f263abd
2 files changed
+13
-1
No files matched your search
@@ -84,7 +84,7 @@ class AttachmentsController < ApplicationController
|
||||
|
||||
@attachment = Attachment.new(:file => request.raw_post)
|
||||
@attachment.author = User.current
|
||||
@attachment.filename = Redmine::Utils.random_hex(16)
|
||||
@attachment.filename = params[:filename].presence || Redmine::Utils.random_hex(16)
|
||||
|
||||
if @attachment.save
|
||||
respond_to do |format|
|
||||
|
||||
Reference in new issue
Block a user