FEATURE: Support backup uploads/downloads directly to/from S3.

This commit is contained in:
Gerhard Schlager
2018-09-10 16:48:34 +02:00
committed by Guo Xiang Tan
parent 5039a6c3f1
commit c29a4dddc1
52 changed files with 1079 additions and 420 deletions

25
app/models/backup_file.rb Normal file
View File

@ -0,0 +1,25 @@
class BackupFile
include ActiveModel::SerializerSupport
attr_reader :filename,
:size,
:last_modified,
:source
def initialize(filename:, size:, last_modified:, source: nil)
@filename = filename
@size = size
@last_modified = last_modified
@source = source
end
def ==(other)
attributes == other.attributes
end
protected
def attributes
[@filename, @size, @last_modified, @source]
end
end