Defect #18667 » set_attachment_content_type_on_upload.patch
| app/controllers/attachments_controller.rb | ||
|---|---|---|
| 82 | 82 |
return |
| 83 | 83 |
end |
| 84 | 84 |
|
| 85 |
@attachment = Attachment.new(:file => request.raw_post)
|
|
| 85 |
@attachment = Attachment.new |
|
| 86 | 86 |
@attachment.author = User.current |
| 87 | 87 |
@attachment.filename = params[:filename].presence || Redmine::Utils.random_hex(16) |
| 88 |
@attachment.file = request.raw_post |
|
| 88 | 89 |
saved = @attachment.save |
| 89 | 90 |
|
| 90 | 91 |
respond_to do |format| |