- refactor for s3 upload feature