Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def nginx_send_file(path)
- # Let Nginx detect content type unless it is explicitly set
- headers['Content-Type'] ||= ""
- headers["Content-Disposition"] ||= "attachment; filename=#{file.split('/').last}"
- headers['X-Accel-Redirect'] = file
- return ' '
- end
Add Comment
Please, Sign In to add comment