Upload CSV and parse data for import into backend (Supabase)

I want users to upload a CSV and parse the data using (https://www.papaparse.com/) to then create rows in my Supabase tables.

Where to start with using:
https://www.papaparse.com/

I think you have two options, either do it on the frontend (recursively call the api/plugin) - not the greatest way, or I think you’ll have to find/create an edge function for this. Orrr maybe you could make a postgres function that takes JSON as parameter and pass CSV as JSON to it.