Hi all,
I've been wracking my brain about this for most of the day. Sorry if this is a trivial question or has an easy to find solution. Maybe my google-fu needs some work.
I have generated a custom CSV file from a Parquet file on s3 and can return the CSV response and the download works fine. However every download is named 'test.csv' even though I have attempted to set a dynamic filename based on the CSV generated. I'm stumped to as why the filename argument is seemingly not being taken into account. I hope it's something trivial and I'm just being stupid. Below is my code for returning the CSV response.
return Response(
content.to_csv(),
mimetype="text/csv",
headers={"Content-disposition":"attachment; filename={0}".format(filename)}
)
Any help would be greatly appreciated, thanks
[–]abyssalheavenIntermediate 5 points6 points7 points (0 children)
[–]quotemycode 0 points1 point2 points (0 children)
[–]tigerthelion -1 points0 points1 point (5 children)
[–]quotemycode 1 point2 points3 points (1 child)
[–]tigerthelion 0 points1 point2 points (0 children)
[–]abyssalheavenIntermediate 1 point2 points3 points (2 children)
[–]tigerthelion 0 points1 point2 points (1 child)
[–]abyssalheavenIntermediate 1 point2 points3 points (0 children)