archive: raise archive service request limit to 500MB (#692)
Some checks failed
CodeQL / Analyze (push) Has been cancelled
Controller Tests / controller-tests (push) Has been cancelled
Jest Tests / jest-tests (push) Has been cancelled

Uploaded singlefiles are base64-encoded into JSON before being sent to the
archive container, so an 88MB upload becomes a ~118MB request.  Sanic's default
REQUEST_MAX_SIZE of 100MB rejected it with a 413 before the handler ran, and the
API surfaced this as KeyError: 'singlefile'.

Only the Docker deployment is affected; Debian/RPi extract in-process.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
lrnselfreliance 2026-09-01 20:08:51 -06:00 • committed by Roland
parent b44a5f1941
commit f1270b4e6c
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680

View file

@ -76,8 +76,12 @@ if not BROWSER_EXEC.is_file():
# Increase response timeout, archiving can take several minutes.
RESPONSE_TIMEOUT = 10 * 60
# The API sends uploaded singlefiles base64-encoded in JSON (a 33% size increase). Sanic's default
# 100MB limit rejects large uploads with a 413 before the handler runs.
REQUEST_MAX_SIZE = 500 * 1024 * 1024
config = {
'RESPONSE_TIMEOUT': RESPONSE_TIMEOUT,
'REQUEST_MAX_SIZE': REQUEST_MAX_SIZE,
}
app = Sanic('archive')