yumechi-no-kuni/src/server
Johann150 414f1d1158
fix: truncate image descriptions (#7699)
* move truncate function to separate file to reuse it

* truncate image descriptions

* show image description limit in UI

* correctly treat null

Co-authored-by: nullobsi <me@nullob.si>

* make truncate Unicode-aware

The strings that truncate returns should now be valid Unicode.

PostgreSQL also counts Unicode Code Points instead of bytes so this
should be correct.

* move truncate to internal, validate in API

Truncating could also be done in src/services/drive/add-file.ts or
src/services/drive/upload-from-url.ts but those would also affect
local images. But local images should result in a hard error if the
image comment is too long.

* avoid overwriting

Co-authored-by: nullobsi <me@nullob.si>
2021-09-30 01:44:22 +09:00
..
activitypub refactor: use path alias to improve readability 2021-08-19 22:04:15 +09:00
api fix: truncate image descriptions (#7699) 2021-09-30 01:44:22 +09:00
file Tune download (#2) 2021-09-03 21:13:06 +09:00
proxy Tune download (#2) 2021-09-03 21:13:06 +09:00
web enhance(client): アップデートが利用可能な場合エラー表示およびダイアログ表示しないように 2021-09-22 22:45:10 +09:00
activitypub.ts fix: mochaが動かないため拡張子なしに戻した 2021-08-19 21:55:45 +09:00
index.ts refactor: use path alias to improve readability 2021-08-19 22:04:15 +09:00
nodeinfo.ts fix: mochaが動かないため拡張子なしに戻した 2021-08-19 21:55:45 +09:00
well-known.ts refactor: use path alias to improve readability 2021-08-19 22:04:15 +09:00