Hi!
Have searched this forum for an answer but haven't found anything helpful.
What should I write to make a jpg for example download when pushing a link?
Right now my code is this:
This is the code I have found on threads here in the forum, but it doesn't work for me. I have enabled sendfile() in the litespeed config (don't know if that helps thought).
How should I write? All that is happening right now is that the jpg gets rendered.
Have searched this forum for an answer but haven't found anything helpful.
What should I write to make a jpg for example download when pushing a link?
Right now my code is this:
def download_path( _id = params[:id])
result = Philestructure.find( _id )
#code checking for permission here. if true, go on
headers['X-LiteSpeed-Location'] = "/downloads/#{result.phile.file_name}"
end
result = Philestructure.find( _id )
#code checking for permission here. if true, go on
headers['X-LiteSpeed-Location'] = "/downloads/#{result.phile.file_name}"
end
How should I write? All that is happening right now is that the jpg gets rendered.