title: How would one use Nginx to proxy uploads to S3?
body: <p>I want to upload files to S3 while masking the S3 bucket name / authentication headers. From my understanding, I can do this using Nginx.</p>
  
  <p>For example, a user would perform a <code>POST</code> request to <code>http://media.mywebsite.com</code> which would then pass through Nginx, appending the authentication headers, and uploading the file. Also, I would like to give each file a random and unique name, and return the URL of where the file was uploaded in the response to the user.</p>
  
  <p>How do I do this? Do I need anything else behind Nginx, or can Nginx handle all of this? I have not used Nginx before, so be kind.</p>
  
  <p>Currently, I am uploading files via a multipart request to my Rails server, but this locks up the server for much too long when larger uploads are performed, so I'm trying to bypass Rails.</p>