Skip to content

Commit 28bced7

Browse files
committed
Fixed error View [.panel.backups] not found
1 parent 25656fb commit 28bced7

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
@extends('layouts.sidebar')
2+
3+
@section('content')
4+
@if (file_exists(base_path('backups/updater-backups/')) and is_dir(base_path('backups/updater-backups/')))
5+
<?php
6+
$filename = $_SERVER['QUERY_STRING'];
7+
8+
$filepath = base_path('backups/updater-backups/') . $filename;
9+
10+
$strFile = file_get_contents($filepath);
11+
12+
header("Content-type: application/force-download");
13+
header('Content-Disposition: attachment; filename="'.$filename.'"');
14+
15+
header('Content-Length: ' . filesize($filepath));
16+
echo $strFile;
17+
while (ob_get_level()) {
18+
ob_end_clean();
19+
}
20+
readfile($filepath);
21+
exit;
22+
?>
23+
@endif
24+
25+
@endsection

0 commit comments

Comments
 (0)