// Upload handler
//
-// Copyright (c) 1996-2022 by the citadel.org team
+// Copyright (c) 1996-2023 by the citadel.org team
//
// This program is open source software. Use, duplication, or
// disclosure are subject to the GNU General Public License v3.
h->response_string = strdup("OK");
h->response_body_length = StrLength(sj);
h->response_body = SmashStrBuf(&sj);
-}
\ No newline at end of file
+}
+
+
+// Dispatcher for paths starting with /ctdl/p/
+void ctdl_p(struct http_transaction *h, struct ctdlsession *c) {
+ if (!strcasecmp(h->url, "/ctdl/p/")) { // upload files
+ upload_files(h, c);
+ return;
+ }
+
+ do_404(h); // unknown
+}