Skip to content Skip to sidebar Skip to footer

Frontend Handling: Files/csv With Rails Api

I have a Rails API endpoint which sends a csv file on API request: def download_csv headers = ['column one', 'column two', 'column three'] csv_data = CSV.generate(headers

Solution 1:

Found the solution.

<Button 
   onClick={() => {window.open(your backend url)})
>

Post a Comment for "Frontend Handling: Files/csv With Rails Api"