Skip to content

Commit

Permalink
Resolve 413 errors by setting Flask's MAX_FORM_MEMORY_SIZE limit to…
Browse files Browse the repository at this point in the history
… 20 MB (#823)

* Resolve 413 Errors by disabling Flask's MAX_FORM_MEMORY_SIZE limit

* Set MAX_FORM_MEMORY_SIZE limit to 20 MB
  • Loading branch information
juhoinkinen authored Dec 18, 2024
1 parent 4fc880b commit 2ffd82b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions annif/default_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class Config(object):
PROJECTS_CONFIG_PATH = os.environ.get("ANNIF_PROJECTS", default="")
DATADIR = os.environ.get("ANNIF_DATADIR", default="data")
INITIALIZE_PROJECTS = False
MAX_FORM_MEMORY_SIZE = 20_000_000 # Increase from Flask's default limit


class ProductionConfig(Config):
Expand Down

0 comments on commit 2ffd82b

Please sign in to comment.