@@ -69,7 +69,7 class AttachmentsController < ApplicationController | |||||
69 |
|
69 | |||
70 | @attachment = Attachment.new(:file => request.body) |
|
70 | @attachment = Attachment.new(:file => request.body) | |
71 | @attachment.author = User.current |
|
71 | @attachment.author = User.current | |
72 |
@attachment.filename = |
|
72 | @attachment.filename = ActiveSupport::SecureRandom.hex(16) | |
73 |
|
73 | |||
74 | if @attachment.save |
|
74 | if @attachment.save | |
75 | respond_to do |format| |
|
75 | respond_to do |format| |
General Comments 0
You need to be logged in to leave comments.
Login now