mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
FIX: add support for .tgz and .gz backup files
This commit is contained in:
@ -110,7 +110,7 @@ class Admin::BackupsController < Admin::AdminController
|
||||
filename = params.fetch(:resumableFilename)
|
||||
total_size = params.fetch(:resumableTotalSize).to_i
|
||||
|
||||
return render status: 415, text: I18n.t("backup.backup_file_should_be_tar_gz") unless filename.to_s.end_with?(".tar.gz")
|
||||
return render status: 415, text: I18n.t("backup.backup_file_should_be_tar_gz") unless /\.(tar\.gz|t?gz)$/i =~ filename
|
||||
return render status: 415, text: I18n.t("backup.not_enough_space_on_disk") unless has_enough_space_on_disk?(total_size)
|
||||
|
||||
file = params.fetch(:file)
|
||||
|
Reference in New Issue
Block a user