perf(photo): stop re-reading the downloaded temp file

download_to_temp buffered the full bytes, wrote them to a temp file, and
prepare_photo then read the whole file back from disk. The bytes are
already in memory — pass them through (download_to_temp now returns
(file, bytes)) so photo processing never touches the disk for input.
Adds the bytes dependency to xmedia-bot (already in the lock via x-media).
This commit is contained in:
2026-08-13 22:24:58 +08:00
parent 505990e49e
commit 1747d321d8
4 changed files with 25 additions and 17 deletions
Generated
+1
View File
@@ -2946,6 +2946,7 @@ dependencies = [
name = "xmedia-bot"
version = "1.1.1"
dependencies = [
"bytes",
"dotenv",
"fast_image_resize",
"html-escape",