title: Uploading CSV to Flask for background processing
body: <p>I'm looking to use Flask to host a single-page website that would allow users to upload a CSV that would be parsed and put into a database. All of the database shenanigans are complete (through SQLalchemy in another Python script) and I've got everything worked out once a script has access to the CSV, I just need help getting it there.</p>
  
  <p>Here's the scenario:</p>
  
  <pre><code>1. User directs browser at URL (probably something like 
     http://xxx.xxx.xxx.xxx/upload/)
  2. User chooses CSV to upload
  3. User presses upload
  4. File is uploaded and processed, but user is sent to a thank you page while our
     script is still working on the CSV (so that their disconnect doesn't cause the
     script to abort).
  </code></pre>
  
  <p>It's totally cool if the CSV is left on the server (in fact, it's probably preferred since we'd have a backup in case processing went awry)</p>
  
  <p>I think what I want is a daemon that listens on a socket, but I'm not really experienced with this and don't know where to start getting it configured or setting up Flask.</p>
  
  <p>If you think some framework other than Flask would be easier, definitely let me know, I'm not tied to Flask, I've just read that it's pretty easy to set up!</p>
  
  <p>Thank you very much!!</p>