diff options
Diffstat (limited to '.github/FILE_LINK.php')
-rw-r--r-- | .github/FILE_LINK.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/.github/FILE_LINK.php b/.github/FILE_LINK.php index 4d7ebb244..34fb4ad3b 100644 --- a/.github/FILE_LINK.php +++ b/.github/FILE_LINK.php @@ -1,5 +1,10 @@ <?php $json = file_get_contents('https://api.github.com/repos/kriztan/Pix-Art-Messenger/releases/latest'); $data = json_decode($json); -echo $data->assets[0]->browser_download_url; +$filename = $data->assets[0]->name; +$filesize = $data->assets[0]->size; +header('Content-Type: application/octet-stream'); +header('Content-Disposition: attachment; filename="'.$filename.'";'); +header('Content-Length: '.$filesize); +readfile($data->assets[0]->browser_download_url); ?> |