Im looking for a way to download a xml file. I use:
file_path = 'folder/' + xml_name + '.xml'
send_file file_path, :type => "text/xml"
but this always downloads me an empty file. The file itself has 16 KB of data in it…
why is that?
Maechi
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Problem saved, but I don’t know why
send_data is working… but send_file not!