Change filename when sending file trough send_file method


#1

Hey guys!
I’m newbie here. so it would be my first question)
I want to send temp file trough send_file method but I want to rename it for user, I found solution for rails but Hanami says that ArgumentError: wrong number of arguments (given 2, expected 1) when I try to:

send_file(some_tempfile.path, filename: 'pretty_name.pdf')

Is someone know any tricks to do it?
Thanks in advance!


#2

@alextrueman Hi and sorry for the late reply due to the Easter break.

We don’t support that feature yet, would you be so kind to create an issue for that? https://github.com/hanami/controller