summaryrefslogtreecommitdiffstats
path: root/cgi-bin/list-files.py
diff options
context:
space:
mode:
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))