commit bad3768
default
·
2023-01-28 17:28:00 +0000 UTC
parent d38ed6b
Attached images have a hashed name instead of a time one.
1 files changed,
+2,
-2
M
html.c
M
html.c
+2,
-2
1@@ -1375,8 +1375,8 @@ int html_post_handler(d_char *req, char *q_path, d_char *payload, int p_size,
2
3 if (*fn != '\0') {
4 char *ext = strrchr(fn, '.');
5- xs *ntid = tid(0);
6- xs *id = xs_fmt("%s%s", ntid, ext);
7+ xs *hash = xs_md5_hex(fn, strlen(fn));
8+ xs *id = xs_fmt("%s%s", hash, ext);
9 xs *url = xs_fmt("%s/s/%s", snac.actor, id);
10 int fo = xs_number_get(xs_list_get(attach_file, 1));
11 int fs = xs_number_get(xs_list_get(attach_file, 2));