I'm using Rails to serve a file to the user like so:
def show headers['Content-Disposition'] = "attachment; filename=\"SIGNATURE\"" headers['Content-Type'] = "text/plain" render :text => 'some text file content' end
My browser (Chrome on OS X) renames
SIGNATURE.txt when downloading.
I have tried several methods such as setting
Content-Type: application/unknown and putting a
How can I ensure that the browser does not attach an extension to the file name?
This is not specifically a Rails question--it most likely a HTTP header response setting I need.