diff options
| author | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2023-03-09 01:29:48 +0100 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2023-03-09 02:02:40 +0100 |
| commit | 2e1b1313962d979b6e15491c63d316d829638bf0 (patch) | |
| tree | e2b74911503568d539ff4f377b80759257590635 /page.h | |
| parent | 13f96054f6fb68aae464363e283e32f01d2da1a3 (diff) | |
| download | slcl-2e1b1313962d979b6e15491c63d316d829638bf0.tar.gz | |
Implement public file sharing
An HTML form is now added next to each regular file, that generates a
POST request. Then, slcl replies with a HTML document with a link to the
public resource (which are implemented as symlinks).
Limitations:
- For now, only regular files can be shared i.e., sharing directories is
not possible. While feasible, it still requires a larger refactor to
list_dir and resource_layout, so that read-only access to the directory
is provided to anonymous users.
Diffstat (limited to 'page.h')
| -rw-r--r-- | page.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -15,5 +15,7 @@ int page_forbidden(struct http_response *r); int page_bad_request(struct http_response *r); int page_resource(struct http_response *r, const char *dir, const char *root, const char *res, const struct page_quota *q); +int page_public(struct http_response *r, const char *res); +int page_share(struct http_response *r, const char *path); #endif /* PAGE_H */ |
