mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
FIX: send content length with backups
This commit is contained in:
@ -46,6 +46,7 @@ class Admin::BackupsController < Admin::AdminController
|
||||
def show
|
||||
filename = params.fetch(:id)
|
||||
if backup = Backup[filename]
|
||||
headers['Content-Length'] = File.size(backup.path)
|
||||
send_file backup.path
|
||||
else
|
||||
render nothing: true, status: 404
|
||||
|
Reference in New Issue
Block a user