zlin / wgetpaste

MIT License
34 stars 18 forks source link

Feature request - include informational max file size message for bpaste server #42

Closed sysfu closed 1 year ago

sysfu commented 1 year ago

Just tried to upload a larger log file to bpaste and it fails like so:

user@pentoo ~ $ wgetpaste -s bpaste /tmp/pentoo-updater.log --verbose                                                                                                                         
Apparently nothing was received. Perhaps the connection failed.                                
--2023-03-21 17:27:00--  https://bpa.st/api/v1/paste                                                                                                                                          
Resolving bpa.st... 65.109.61.99, 2a01:4f9:5a:5159::2                                                                                                                                         
Connecting to bpa.st|65.109.61.99|:443... connected.                                                                                                                                          
HTTP request sent, awaiting response... 413 Request Entity Too Large                           
2023-03-21 17:27:03 ERROR 413: Request Entity Too Large.          

Smaller log files upload without issue.

I did some digging and it looks like bpaste.net limits the upload size to 256K.

It would be helpful if wgetpaste could provide an informational message warning users of this size limit when the bpaste service is selected.

sysfu commented 1 year ago

Just noticed that another issue concerning the same problem has already been opened, https://github.com/zlin/wgetpaste/issues/41