Defect #18667 » set_attachment_content_type_on_upload.patch
| 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|
|
||