summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorVincent Douillet <vincent@vdouillet.fr>2024-09-06 12:21:06 +0200
committerVincent Douillet <vincent@vdouillet.fr>2024-09-06 12:22:20 +0200
commitd7edafe299d44a0bec9d29e2b3a4ca853ffa1a80 (patch)
tree9f4de85662fbfd997bf5ee96671a2f776f2c53a6 /main.c
parent35a145fd161fb4d4f19aa9820b50438695b94414 (diff)
upload: add form
Diffstat (limited to 'main.c')
-rw-r--r--main.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/main.c b/main.c
index 1561a09..137ac14 100644
--- a/main.c
+++ b/main.c
@@ -38,16 +38,19 @@
#include "config.h"
#include "download.h"
#include "http.h"
+#include "upload.h"
enum page {
PAGE_BROWSE,
PAGE_DOWNLOAD,
+ PAGE_UPLOAD,
PAGE__MAX
};
static const char *const pages[PAGE__MAX] = {
BROWSE_URL,
- DOWNLOAD_URL
+ DOWNLOAD_URL,
+ UPLOAD_URL
};
int
@@ -96,6 +99,9 @@ main(void)
case PAGE_DOWNLOAD:
ret = download(&r);
break;
+ case PAGE_UPLOAD:
+ ret = upload(&r);
+ break;
default:
http_exit(&r, KHTTP_404, NULL);
}