fixes for direct s3 upload