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
XML file.

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
=> "foo.txt"
end

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.

Any suggestions?

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to