diff options
| author | 2023-01-28 18:28:00 +0100 | |
|---|---|---|
| committer | 2023-01-28 18:28:00 +0100 | |
| commit | bad376825069a6422d4c99190fe3d1d4e3d93f66 (patch) | |
| tree | 6d71d53c95d1d023765d2bc600303feb338909eb | |
| parent | Updated RELEASE_NOTES. (diff) | |
| download | snac2-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.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, | |||
| 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)); |