aboutsummaryrefslogtreecommitdiffstats
path: root/src/server/HttpServer.hx
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/HttpServer.hx')
-rw-r--r--src/server/HttpServer.hx14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/server/HttpServer.hx b/src/server/HttpServer.hx
index f6fb27f..b339059 100644
--- a/src/server/HttpServer.hx
+++ b/src/server/HttpServer.hx
@@ -90,12 +90,16 @@ class HttpServer {
res.setHeader("accept-ranges", "bytes");
res.setHeader("content-type", getMimeType(ext));
- if (cache != null && req.method == "POST") {
+ if (req.method == "POST") {
+ if (cache != null) {
+ switch url.pathname {
+ case "/upload-last-chunk":
+ uploadFileLastChunk(req, res);
+ case "/upload":
+ uploadFile(req, res);
+ }
+ }
switch url.pathname {
- case "/upload-last-chunk":
- uploadFileLastChunk(req, res);
- case "/upload":
- uploadFile(req, res);
case "/setup":
finishSetup(req, res);
}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage