[Suggestion] Image size check #18
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
For people who dont have nitro would be usefull if you can have an option to upload images higher or lower then 8mb.Sometimes i save to many pictures and the bot stops uploading because of a high size image,so if you could check the file size and if is higher then 8 then just skip,kinda option.
Hi @VARYOS
I think there was a problem with previous versions where it would terminate if it couldn't upload an image (because it was too big or for some other reason). That should no longer happen, it will just skip that one (eventually, after trying a few times).
It is reasonable to resize images larger than 8Mb though.... I'll look into that.
Yea,i saw that.I did a test now with 2 pics.First pic. save was the 8mb then the second pic.
Tries to upload the 8mb file 4 times,fails,after last attempt is goes back and tries another 4 times,then goes to upload the second pic(witch goes through) and then goes back to keep trying to upload the high file size the same way, 2x 4times.Then i saved another random pic. pic3 and it got throught and it got back to trying to upload the 8mb one. So..
1.Save first: pic1(8mb),save second: pic2(less then 8mb).
2.Tries to upload pic1 one time with 4 retry,fails.
3.Goes back and tries again on the same file,same as before,one time 4 retrys \ so in total 8 retry with the ones from before.
4.Uploads the lower file,succeed.
5.Goes back to try and upload the high file size,same as before, 2 times 4 retry each.
6.Meanwhile i saved a random pic3(lower then 8mb),it uploads and then goes back trying to upload the 8mb one.
I was thinking if you have more pics higher then 8mb with all the retries to upload the time to upload the small one will get longer,so my thought was just to check the file size and skip it (or if you get the
Edit: Forgot to say,if you delete the file while the program is in "retry to upload" state it will just close itself after 5sec(more or less)
Thank you! Looks like you’ve found some interesting edge case bugs I need to squash as well as dealing with the 8mb issue.
Hello @VARYOS , I've released v0.11.1 which partially alleviates this problem. Too-large uploads will fail immediately (no retries) and will not be re-added to the queue when other uploads occur. I will leave this issue open, as I would like to include configurable detection of large files, and a choice of ignoring or resizing them.
Hi,
I found:
1.If you left click anywhere on the console the program stops until you press ENTER(idk if that's intended to work like that)
2.PIC1 to PIC20 high size,PIC21-low size.
New save file in between que file/pictures will be ignored until the que is finish. / if you have a picture when the que is at PIC7 the program will still go through the whole que until PIC20 and then tries to upload the new save file/pic you made ,so if you have a bunch of them in the que will take a while.
Video for exemple.
Note :I used the file date changer so I do not have to keep saving new files for every test.
//Off-topic
3.Support for files .bmp .jpeg if possible.
Thanks for the video. It doesn’t match my experience but I don’t use windows at all - I just cross compile.
I will have to test on a windows machine.
Can you confirm that was with v0.11.1 ?
The pause-on-click behaviour is caused by the windows terminal going into copy/paste mode - you can see that change in the title bar. It’s an annoying behaviour but I don’t have any control over that.
an idea for images over 8mb (or over the limit of the server):
Use imgur's api and let user supply their own imgur api key
https://api.imgur.com/
I can confirm webhooks can send larger images on boosted servers but with webhooks alone I have no way of testing what file sizes a server supports other then sending a few test images of specific sizes to see if they work
Yea,it was on v0.11.1.
One of my friend had nitro or boosted server and was able to upload large pics/file size,i sas few of them around 50mb and im pretty sure you can go even larger until 100mb the discord limit ,this option i suggested would be nice for people who do not have the nitro/boosted server.
I've released v0.11.2 which really fixes the bug where it keeps trying to upload too-large files. Thanks for the report! I will keep this open to track potentially adding a resize option.