Send failed from rails server to download in the browser

Posted by Markus on Stack Overflow See other posts from Stack Overflow or by Markus
Published on 2010-03-31T08:45:42Z Indexed on 2010/03/31 9:53 UTC
Read the original article Hit count: 467

Filed under:
|

Hi everybody,

I have a web application which has some multimedia files stored in a user protected area. To make this files available to logged in customers, I consider using the x-sendfile plugin.

x_send_file(path, :type => 'application/pdf')

It is just strange that every time I run this function a empty file gets sent to the browser download. I checked the path which is correct (app fails if I change it to a inexistent file). Actually if I use the rails internal send_file method, the same error occurs...

Any help is appreciated!

Markus

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about x-sendfile