This commit is contained in:
Aevann1 2022-05-01 23:44:38 +02:00
parent de062c025d
commit 709a7fc4b5
31 changed files with 116 additions and 62 deletions

View file

@ -48,6 +48,9 @@ def error_405(e):
@app.errorhandler(413)
def error_413(e):
return {"error": "Max file size is 8 MB (16 MB for paypigs)"}, 413
if request.headers.get("Authorization") or request.headers.get("xhr"):
return {"error": "Max image size is 8 MB (16 MB for paypigs)"}, 413
else: return render_template('errors/413.html', err=True), 413
@app.errorhandler(429)
def error_429(e):