c2s and s2s image attachment debug

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

View File

@ -1401,6 +1401,9 @@ def _create_post_s2s(base_dir: str, nickname: str, domain: str, port: int,
if locn_url:
new_post['object']['location']['url'] = locn_url
if attach_image_filename:
if debug:
print('DEBUG: creating s2s post with attached media ' +
attach_image_filename)
new_post['object'] = \
attach_media(base_dir, http_prefix, nickname, domain, port,
new_post['object'], attach_image_filename,
@ -1408,6 +1411,9 @@ def _create_post_s2s(base_dir: str, nickname: str, domain: str, port: int,
city, low_bandwidth,
media_license_url, media_creator, system_language,
debug)
else:
if debug:
print('DEBUG: creating s2s post with no attached media')
_attach_post_license(new_post['object'], content_license_url)
_attach_buy_link(new_post['object'], buy_url, translate)
_attach_chat_link(new_post['object'], chat_url)
@ -1569,6 +1575,9 @@ def _create_post_c2s(base_dir: str, nickname: str, domain: str, port: int,
new_post['object']['location']['url'] = locn_url
if attach_image_filename:
if debug:
print('DEBUG: creating c2s post with attached media ' +
attach_image_filename)
new_post = \
attach_media(base_dir, http_prefix, nickname, domain, port,
new_post, attach_image_filename,
@ -1576,6 +1585,9 @@ def _create_post_c2s(base_dir: str, nickname: str, domain: str, port: int,
city, low_bandwidth,
media_license_url, media_creator,
system_language, debug)
else:
if debug:
print('DEBUG: creating c2s post with no attached media')
_attach_post_license(new_post, content_license_url)
_attach_buy_link(new_post, buy_url, translate)
_attach_chat_link(new_post, chat_url)

View File

@ -1,5 +1,5 @@
#!/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\|final uploaded image size' > .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\|creating s2s post with no attached media\|creating c2s post with no attached media\|creating s2s post with attached media\|creating c2s post with attached media' > .image.txt
if [ ! -f .image.txt ]; then
echo 'No image warnings'
else