search for: temp_download_file_path

Displaying 2 results from an estimated 2 matches for "temp_download_file_path".

2008 Oct 27
8
why can't johnny download?
...cal machine and not on the server. This is probably more correctly an html or unix/linux issue or something to do with how I''m constructing my path, but I don''t know enough about what''s wrong to tell for sure. Here''s the relevant code that makes the link: @temp_download_file_path = "/tmp/#{modified_email}.csv" ... FasterCSV.open(@temp_download_file_path, "w") do |csv| @contacts.each do |one_contact| ...csv stuff that is working and not relevant end end render :update do |page| page.replace_html ''div_for_...
2012 Mar 13
1
send_data always sends xml file?
...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...