summaryrefslogtreecommitdiffstats
path: root/cgi-bin/list-files.py
diff options
context:
space:
mode:
authorMaks Jopek <maks@jopek.eu>2026-07-11 00:48:14 +0200
committerMaks Jopek <maks@jopek.eu>2026-07-11 00:49:00 +0200
commita51e2c24a927fea0af92677d8fba7015bd4e4ccd (patch)
tree3fd60d5e476b0039d12e7ba70c0282b447f52447 /cgi-bin/list-files.py
downloadpuszcza.jopek.eu-a51e2c24a927fea0af92677d8fba7015bd4e4ccd.tar.gz
puszcza.jopek.eu-a51e2c24a927fea0af92677d8fba7015bd4e4ccd.tar.zst
puszcza.jopek.eu-a51e2c24a927fea0af92677d8fba7015bd4e4ccd.zip
Initial commit
Diffstat (limited to 'cgi-bin/list-files.py')
-rwxr-xr-xcgi-bin/list-files.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/cgi-bin/list-files.py b/cgi-bin/list-files.py
new file mode 100755
index 0000000..15d6391
--- /dev/null
+++ b/cgi-bin/list-files.py
@@ -0,0 +1,9 @@
+#!/usr/bin/env python
+import json, os
+
+print("Content-Type: application/json; charset=utf-8")
+print("")
+
+dir_list = os.listdir("uploads")
+
+print(json.dumps(dir_list))