Skip to content

Commit 084f713

Browse files
1 parent 983d1d3 commit 084f713

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

backend/.env.example

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@ DEBUG=True
22
DATABASE_URL=sqlite:///files/data.db
33
OPENCV_VIDEO_SOURCE=0
44
SECRET_KEY=change-this-key
5-
JWT_SECRET_KEY=change-this-key-to-something-different
5+
JWT_SECRET_KEY=change-this-key-to-something-different
6+
# 2 MB max size upload (2 * 1024 * 1024)
7+
MAX_CONTENT_LENGTH=2097152

backend/src/app.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from flask_restful import Api
33
from flask_jwt_extended import JWTManager
44
from flask_cors import CORS
5-
from flask_uploads import configure_uploads, patch_request_class
5+
from flask_uploads import configure_uploads
66
from marshmallow import ValidationError
77

88
from src.libs.image_helper import IMAGE_SET
@@ -18,7 +18,6 @@
1818
app = Flask(__name__)
1919
app.config.from_object("src.settings.FlaskAppConfiguration")
2020
api = Api(app)
21-
patch_request_class(app, 2 * 1024 * 1024) # 2 MB max size upload
2221
configure_uploads(app, IMAGE_SET)
2322
jwt = JWTManager(app)
2423
cors = CORS(app)

0 commit comments

Comments
 (0)