abijith

Joined

50 Experience
0 Lessons Completed
0 Questions Solved

Activity

I have a Rails application with React in the front end and deployed in Heroku.

I am trying to send a file from the server to the browser side. I did saw the Rails "send_file" but it makes use of Rack::Sendfile middleware, which is not supported by Heroku.

To quote from Heroku's documentation:
"Heroku does not support the use of Rack::Sendfile. Rack::Sendfile usually requires that a front-end webserver like nginx or apache is running on the same machine as your app. This is not how Heroku is architected. Using the Rack::Sendfile middleware will cause your file downloads to fail, because it sends a body with a content length of 0."

And due to client requirements, I have to stick onto Heroku .
Please let me know of any works around for this.