I am using send_file to allow users to download files from my website,
please see code beloe:
:filename => “test.pdf”,
:type => ‘application/pdf’,
:disposition => ‘attachment’,
:streaming => ‘true’,
:buffer_size => ‘4096’)
If i leave disposition => “attachment” i get the following error when
trying to open the document:
“Adobe Reader could not open the file type …because it is either not
a supported file type or because the file has become damaged…”
Or if i change disposition => “inline” i get the following error
File does not begin with ‘%PDF-’ "
Whats that all about??? I have the mime types set up correctly.
Can anyone help me?