mirror of https://gitlab.com/bashrc2/epicyon
Image upload debug
parent
05b8cc401a
commit
7974340b44
4
media.py
4
media.py
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue