From 77e0d8658d67ba8da17cce5ff2004a0d43184903 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Wed, 10 Aug 2022 18:48:20 +0200 Subject: [PATCH] repo.php: parameter 'file': get raw data of a file from a repository --- repo.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/repo.php b/repo.php index f40a680a..1e4e5111 100644 --- a/repo.php +++ b/repo.php @@ -60,6 +60,13 @@ if ($branchId) { } } +if (array_key_exists('file', $_REQUEST)) { + $file = $repo->file_get_contents($_REQUEST['file']); + Header("Content-Type: text/plain; charset=utf/8"); + print $file; + exit(0); +} + $cacheDir = null; $ts = $repo->timestamp($path); if (isset($config['cache'])) {