mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: Support backup uploads/downloads directly to/from S3.
This commit is contained in:
committed by
Guo Xiang Tan
parent
5039a6c3f1
commit
c29a4dddc1
23
app/models/backup_location_site_setting.rb
Normal file
23
app/models/backup_location_site_setting.rb
Normal file
@@ -0,0 +1,23 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require_dependency 'enum_site_setting';
|
||||
|
||||
class BackupLocationSiteSetting < EnumSiteSetting
|
||||
LOCAL ||= "local"
|
||||
S3 ||= "s3"
|
||||
|
||||
def self.valid_value?(val)
|
||||
values.any? { |v| v[:value] == val }
|
||||
end
|
||||
|
||||
def self.values
|
||||
@values ||= [
|
||||
{ name: "admin.backups.location.local", value: LOCAL },
|
||||
{ name: "admin.backups.location.s3", value: S3 }
|
||||
]
|
||||
end
|
||||
|
||||
def self.translate_names?
|
||||
true
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user