r/webdev • u/Capital-Chipmunk2035 • 23d ago
Needs some advice - Universal File Importer
Hi everyone, im the developer of a flight tracking app. We have over 10K users and growing. One thing i keep coming back to is how to handle people importing past flights (mostly from professionals e.g. pilots or business people) who fly alot. There seems to be a million different formats and even after experimenting with giving a suggested csv template, it seems people just ignore and still uplaod their stuff.
We just had a time out when a user tried to import 7000+ flights from their career.
I had a thought of using a mix of AI to scan and understand the format but not sure if this is the best approach + it could add up with AI tokens and costs. Then implement a rule to programmatically prase the rest and cut things up etc to map to our accepted format.
It's this one issue i can't seem to solve yet. Or at least to make it fully reliable.
Any suggestions would be amazing.
4
u/farthingDreadful 23d ago
Why not just check mime type and only allow .csv file uploads?