summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar default2023-01-28 18:28:00 +0100
committerGravatar default2023-01-28 18:28:00 +0100
commitbad376825069a6422d4c99190fe3d1d4e3d93f66 (patch)
tree6d71d53c95d1d023765d2bc600303feb338909eb
parentUpdated RELEASE_NOTES. (diff)
downloadsnac2-bad376825069a6422d4c99190fe3d1d4e3d93f66.tar.gz
snac2-bad376825069a6422d4c99190fe3d1d4e3d93f66.tar.xz
snac2-bad376825069a6422d4c99190fe3d1d4e3d93f66.zip
Attached images have a hashed name instead of a time one.
-rw-r--r--html.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/html.c b/html.c
index 7a388a1..2d9ebe9 100644
--- a/html.c
+++ b/html.c
@@ -1375,8 +1375,8 @@ int html_post_handler(d_char *req, char *q_path, d_char *payload, int p_size,
1375 1375
1376 if (*fn != '\0') { 1376 if (*fn != '\0') {
1377 char *ext = strrchr(fn, '.'); 1377 char *ext = strrchr(fn, '.');
1378 xs *ntid = tid(0); 1378 xs *hash = xs_md5_hex(fn, strlen(fn));
1379 xs *id = xs_fmt("%s%s", ntid, ext); 1379 xs *id = xs_fmt("%s%s", hash, ext);
1380 xs *url = xs_fmt("%s/s/%s", snac.actor, id); 1380 xs *url = xs_fmt("%s/s/%s", snac.actor, id);
1381 int fo = xs_number_get(xs_list_get(attach_file, 1)); 1381 int fo = xs_number_get(xs_list_get(attach_file, 1));
1382 int fs = xs_number_get(xs_list_get(attach_file, 2)); 1382 int fs = xs_number_get(xs_list_get(attach_file, 2));