22 lines
746 B
PHP
22 lines
746 B
PHP
<?php
|
||
/** Auslieferung der App-Dateien – nur für angemeldete Mitarbeiter. */
|
||
require_once __DIR__ . '/../includes/bootstrap.php';
|
||
$staff = require_staff_login();
|
||
|
||
$info = app_download_info((string) ($_GET['platform'] ?? ''));
|
||
if (!$info) {
|
||
http_response_code(404);
|
||
exit('Diese App ist nicht hinterlegt.');
|
||
}
|
||
|
||
session_write_close(); // lange Downloads sollen die Sitzung nicht blockieren
|
||
@set_time_limit(0);
|
||
while (ob_get_level() > 0) { @ob_end_clean(); }
|
||
|
||
header('Content-Type: ' . $info['mime']);
|
||
header('Content-Disposition: attachment; filename="' . $info['filename'] . '"');
|
||
header('Content-Length: ' . $info['size']);
|
||
header('X-Content-Type-Options: nosniff');
|
||
header('Cache-Control: private, no-store');
|
||
readfile($info['path']);
|