Flask send large csv to angularJS frontend to download
You should give user just a link to download this data and convert it to JSON on your backend. Don't do this on frontend, because you don't do any post-processing things on frontend.
Make an url for your query view with postfix like '/csv' and make a view for it.
I have a Flask application performs an API query to a database, which returns a typically large JSON file (around 20-50MB). My intentions are to convert this JSON response into csv data, and return this back to the frontend, which should then prompt the user to download the file. The conversion part I have handled, but what is the best way to transfer this CSV file to the client for download? Should I stream it to avoid any memory overload on the browser? Any advice would be appreciated.