mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-06 19:34:15 -05:00
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