JS file uploader to Amazon S3 CORS with some PHP help