diff options
author | default <nobody@localhost> | 2023-01-28 18:28:00 +0100 |
---|---|---|
committer | default <nobody@localhost> | 2023-01-28 18:28:00 +0100 |
commit | bad376825069a6422d4c99190fe3d1d4e3d93f66 (patch) | |
tree | 6d71d53c95d1d023765d2bc600303feb338909eb | |
parent | d38ed6bb01066800740ceee5f6298788a4507dd1 (diff) |
Attached images have a hashed name instead of a time one.
-rw-r--r-- | html.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1375,8 +1375,8 @@ int html_post_handler(d_char *req, char *q_path, d_char *payload, int p_size, if (*fn != '\0') { char *ext = strrchr(fn, '.'); - xs *ntid = tid(0); - xs *id = xs_fmt("%s%s", ntid, ext); + xs *hash = xs_md5_hex(fn, strlen(fn)); + xs *id = xs_fmt("%s%s", hash, ext); xs *url = xs_fmt("%s/s/%s", snac.actor, id); int fo = xs_number_get(xs_list_get(attach_file, 1)); int fs = xs_number_get(xs_list_get(attach_file, 2)); |