title: Django upload file into specific directory that depends on the POST URI
body: <p>I'd like to store uploaded files into a specific directory that depends on the URI of the POST request.  Perhaps, I'd also like to rename the file to something fixed (the name of the file input for example) so I have an easy way to grep the file system, etc. and also to avoid possible security problems.</p>
  
  <p>What's the preferred way to do this in Django?</p>
  
  <p>Edit: I should clarify that I'd be interested in possibly doing this as a file upload handler to avoid writing a large file twice to the file system.</p>
  
  <p>Edit2: I suppose one can just 'mv' the tmp file to a new location.  That's a cheap operation if on the same file system.</p>