Spaces:
Paused
Paused
Download api/download.php from josephrw/videoapp-compiler: direct link, hf CLI and curl.
- Browser
- Download file 468 Bytes
-
https://huggingface.co/spaces/josephrw/videoapp-compiler/resolve/main/api/download.php
- Command line
-
hf download hf://spaces/josephrw/videoapp-compiler/api/download.php
-
curl -L -o download.php https://huggingface.co/spaces/josephrw/videoapp-compiler/resolve/main/api/download.php
468 Bytes
| require_once __DIR__ . '/config.php'; | |
| $id = $_GET['id'] ?? null; | |
| if (!$id || !preg_match('/^[a-f0-9]{16}$/', $id)) { | |
| fail_json('Invalid id'); | |
| } | |
| $zipPath = DMG_DIR . "/$id.videoapp.zip"; | |
| if (!file_exists($zipPath)) { | |
| fail_json('Package not found', 404); | |
| } | |
| header('Content-Type: application/zip'); | |
| header('Content-Disposition: attachment; filename="' . $id . '.videoapp.zip"'); | |
| header('Content-Length: ' . filesize($zipPath)); | |
| readfile($zipPath); | |
| exit; | |