From b16e6f828949b2175cf69eb75768228bf31d23ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Thu, 25 Sep 2014 18:28:51 +0200 Subject: [PATCH] FIX: stream backups upload to S3 --- app/models/backup.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/models/backup.rb b/app/models/backup.rb index be7d84c863a..2fb0c806137 100644 --- a/app/models/backup.rb +++ b/app/models/backup.rb @@ -53,8 +53,9 @@ class Backup def upload_to_s3 return unless s3 - file = File.read(@path) - s3.upload(file, @filename) + File.open(@path) do |file| + s3.upload(file, @filename) + end end def remove_from_s3