url fix
CI Feature / Load example-gitea-env.conf to pipeline env (push) Failing after 15s
CI Feature / Bats tests (push) Has been skipped
CI Feature / Cucumber tests (push) Has been skipped
CI Feature / Report Summary (push) Successful in 4s

This commit is contained in:
moilanik
2026-06-28 08:52:47 +03:00
parent baa5e8dac6
commit 9008a60d06
+3 -2
View File
@@ -20,14 +20,15 @@ data:
}
upload-server.py: |
#!/usr/bin/env python3
import http.server, os, sys, tarfile, io
import http.server, os, sys, tarfile, io, urllib.parse
PORT = int(os.environ.get("UPLOAD_PORT", "8081"))
DATA_ROOT = "/app/data"
class Handler(http.server.BaseHTTPRequestHandler):
def do_PUT(self):
dest = DATA_ROOT + self.path.rstrip("/")
path = urllib.parse.unquote(self.path)
dest = DATA_ROOT + path.rstrip("/")
os.makedirs(dest, exist_ok=True)
length = int(self.headers.get("Content-Length", 0))
body = self.rfile.read(length)