Direct Upload to Amazon S3 With CORS - forked to add additional callbacks