I’m trying to use send_data to send a simple text file.
Every reference I can find says I can supply a MIME type with the
“:type” option and that will determine the kind of file I get on the
machine that downloads the file I’m sending. Instead I ALWAYS get an
here’s the code snippet:
File.open(@temp_download_file_path, ‘r’) do |f|
send_data f.read, :type => “text/plain; charset=utf-8”, :filename
No matter what I use for “:type” (including leaving it out), I still get
a file on the other end that the Mac thinks is an xml file. The file
extension on the filename parameter also does not budge it off of making
it an xml file.