Project

General

Profile

Defect #18667 » set_attachment_content_type_on_upload.patch

AttachmentController#upload patch - Thomas Löber, 2014-12-17 11:51

View differences:

app/controllers/attachments_controller.rb
return
end
@attachment = Attachment.new(:file => request.raw_post)
@attachment = Attachment.new
@attachment.author = User.current
@attachment.filename = params[:filename].presence || Redmine::Utils.random_hex(16)
@attachment.file = request.raw_post
saved = @attachment.save
respond_to do |format|
    (1-1/1)