String key = putObjectRequest.getKey();
ObjectMetadata metadata = putObjectRequest.getMetadata();
InputStream input = putObjectRequest.getInputStream();
com.amazonaws.util.ProgressListener progressListener = putObjectRequest.getGeneralProgressListener();
if (progressListener == null && putObjectRequest.getProgressListener() != null) {
progressListener = new LegacyS3ProgressListener(putObjectRequest.getProgressListener());
}
if (metadata == null) metadata = new ObjectMetadata();
assertParameterNotNull(bucketName, "The bucket name parameter must be specified when uploading an object");