Fix S3 uploads in production environment