mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 00:07:02 -04:00
fix 500 errors with excel files > 500k size limit
werkzeug's internal workings keep files under 500kb in memory, and files greater than 500kb as a TemporaryFile (https://github.com/pallets/werkzeug/blob/0.11-maintenance/werkzeug/formparser.py#L38) when we encounter a CSV or TSV, we call normalise_newlines, which invokes `.read()`, however when we were passing straight into pyexcel, we called `file.getvalue()` - this exists on BytesIO (small files) but not on TemporaryFile objects (large files) - we were seeing 500 errors
This commit is contained in:
@@ -8,7 +8,6 @@ from bs4 import BeautifulSoup
|
||||
from functools import partial
|
||||
from flask import url_for
|
||||
from tests import validate_route_permission
|
||||
from datetime import datetime
|
||||
|
||||
template_types = ['email', 'sms']
|
||||
|
||||
|
||||
Reference in New Issue
Block a user