Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHeinrich Lee Yu <hleeyu@gmail.com>2019-01-03 08:17:07 +0300
committerHeinrich Lee Yu <hleeyu@gmail.com>2019-01-07 06:21:30 +0300
commitf54290de751e365be0928c66bb75fd106bb7aa88 (patch)
treeda09c1505ede95633e7312080ab48986ae7382cb /lib
parente2698d5d7455d91fa94f9bbf1fc838f8cb142700 (diff)
Remove caching of CSV file
Load whole file in memory to simplify code
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/email/attachment_uploader.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/email/attachment_uploader.rb b/lib/gitlab/email/attachment_uploader.rb
index bffea697f9a..3323ce60158 100644
--- a/lib/gitlab/email/attachment_uploader.rb
+++ b/lib/gitlab/email/attachment_uploader.rb
@@ -23,8 +23,8 @@ module Gitlab
content_type: attachment.content_type
}
- link = UploadService.new(project, file).execute.to_h
- attachments << link if link
+ uploader = UploadService.new(project, file).execute
+ attachments << uploader.to_h if uploader
ensure
tmp.close!
end