summaryrefslogtreecommitdiff
path: root/download.h
diff options
context:
space:
mode:
authorVincent Douillet <vincent@vdouillet.fr>2024-01-12 18:14:17 +0100
committerVincent Douillet <vincent@vdouillet.fr>2024-01-12 18:26:22 +0100
commit760031b4a74d70bdeaab4ce9aedfe772acd05bd3 (patch)
tree443a456770d5db052a3dfe3d2f1a8e5f66604ccb /download.h
parent43f65c76152017420ce723b4d4ef4230ff072818 (diff)
browse: build download url for files
Diffstat (limited to 'download.h')
-rw-r--r--download.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/download.h b/download.h
index 87134b2..3d9943a 100644
--- a/download.h
+++ b/download.h
@@ -33,9 +33,19 @@
#include <kcgi.h>
+#include "file.h"
+
#define DOWNLOAD_URL "download"
/*
+ * Build the URL to download a file and assigns it to the file's action_url.
+ * All parameters are required
+ * Returns the length of the created URL, or 0 in case of failure.
+ */
+size_t
+build_download_url(struct kreq *, struct file *);
+
+/*
* Return a requested file.
* The KCGI request is required.
*/