Right now if a user uploads a CSV with incorrect headers or bad column values, our logic fails silently. We should validate CSVs on upload, and add error reporting so that the user can see what file is expected of them.
Here's our CSV parsing method:
|
def parse_csv_upload(csv_upload): |
Here's where we can communicate errors to user: https://github.com/dhmit/sonification/blob/0b3991516f64a235ff7b620d4e8636aa821b32ab/frontend/components/UploadFileInput.js
Right now if a user uploads a CSV with incorrect headers or bad column values, our logic fails silently. We should validate CSVs on upload, and add error reporting so that the user can see what file is expected of them.
Here's our CSV parsing method:
sonification/backend/app/analysis/encoders.py
Line 135 in 0b39915
Here's where we can communicate errors to user: https://github.com/dhmit/sonification/blob/0b3991516f64a235ff7b620d4e8636aa821b32ab/frontend/components/UploadFileInput.js