mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 09:08:10 +08:00
FIX: Processing incoming email should be done in a background job.
This commit is contained in:
@ -553,7 +553,7 @@ module Email
|
||||
def create_post_with_attachments(options={})
|
||||
# deal with attachments
|
||||
attachments.each do |attachment|
|
||||
tmp = Tempfile.new("discourse-email-attachment")
|
||||
tmp = Tempfile.new(["discourse-email-attachment", File.extname(attachment.filename)])
|
||||
begin
|
||||
# read attachment
|
||||
File.open(tmp.path, "w+b") { |f| f.write attachment.body.decoded }
|
||||
|
Reference in New Issue
Block a user