summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/controllers/attachments_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb
index 74a11a1c7..13871c323 100644
--- a/app/controllers/attachments_controller.rb
+++ b/app/controllers/attachments_controller.rb
@@ -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|