Image upload debug

main
bashrc 2026-05-07 15:13:04 +01:00
parent 05b8cc401a
commit 7974340b44
2 changed files with 5 additions and 1 deletions

View File

@ -780,6 +780,10 @@ def attach_media(base_dir: str, http_prefix: str,
copyfile(image_filename, media_filename) copyfile(image_filename, media_filename)
_log_uploaded_media(base_dir, nickname, domain, media_filename) _log_uploaded_media(base_dir, nickname, domain, media_filename)
_update_etag(media_filename) _update_etag(media_filename)
if debug:
file_size: int = os.path.getsize(media_filename)
print('DEBUG: final uploaded image size ' +
str(file_size) + ' bytes')
return post_json return post_json

View File

@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
journalctl -u epicyon | grep 'image binary\|favicon is not an image\|image size before\|watermark failed\|image metadata removal\|media saved to\|failed to restore backup image\|failed to rename image\|media could not be saved to\|failed to delete backup image\|post_message_to_outbox unable to rename\|rename image upload\|uploaded image saved to\|uploaded image not saved' > .image.txt journalctl -u epicyon | grep 'image binary\|favicon is not an image\|image size before\|watermark failed\|image metadata removal\|media saved to\|failed to restore backup image\|failed to rename image\|media could not be saved to\|failed to delete backup image\|post_message_to_outbox unable to rename\|rename image upload\|uploaded image saved to\|uploaded image not saved\|final uploaded image size' > .image.txt
if [ ! -f .image.txt ]; then if [ ! -f .image.txt ]; then
echo 'No image warnings' echo 'No image warnings'
else else