FIX: send content length with backups

This commit is contained in:
Sam
2014-09-23 09:25:53 +10:00
parent 7a4082cbad
commit 9428ad779f
2 changed files with 8 additions and 4 deletions

View File

@ -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