Refactoring S3 uploads yet again