0

This might be a bit of a noob question, so I apologize in advance. How do I make a web server running flask+redis serve binary files as a response to a link/query?

I want the response to the link to be either some AJAX action such as changing a div, or popping up an "unavailable" response, or to serve back some binary file. I would like help both with the client side (jQuery / other Javascript) and the server side.

Thanks!

Side question: Would you choose redis for this task? Or maybe something else such as MongoDB, or a regular RDBMS? And why?

Guy Adini
  • 5,188
  • 5
  • 32
  • 34
  • 1
    For your side question, refer to this [nice thread](http://stackoverflow.com/questions/441441/why-should-i-use-document-based-database-instead-of-relational-database) – Salil Jul 01 '12 at 05:57

1 Answers1

1

Normally you would configure your webserver so that URLs that refer to static files are handled directly by the server, rather than going through Flask.

Daniel Roseman
  • 588,541
  • 66
  • 880
  • 895
  • Yeah... This is a pretty strange situation, where the webpage is actually the report of some test suite that I run, and its "links" need to be to content which might or might not be available. – Guy Adini Jun 30 '12 at 20:24