Skip to content

Commit

Permalink
Update Frontend.php
Browse files Browse the repository at this point in the history
  • Loading branch information
asilvafx authored Nov 16, 2024
1 parent fb0bbef commit a8f43c8
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions app/core/models/Frontend.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,23 @@ function SecureDl($f3, $args)
exit;
}

function Assets($f3, $args)
{
$slug = empty($args[0]) ? '' : $args[0];

$file_url = BASE_PATH . '/ui/' . $slug;
if (!file_exists($file_url)) {
$f3->reroute('/');
} else {
header('Content-Type: application/octet-stream');
header("Content-Transfer-Encoding: Binary");
header("Content-disposition: attachment; filename=\"" . basename($file_url) . "\"");
readfile($file_url);
}
exit;
}


function Public($f3, $args)
{
$slug = empty($args[0]) ? '' : $args[0];
Expand Down

0 comments on commit a8f43c8

Please sign in to comment.