aws-storage-s3/src/main/java/com/amplifyframework/storage/s3/operation/AWSS3StorageUploadFileOperation.java [70:104]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            @NonNull Consumer<StorageException> onError
    ) {
        super(Objects.requireNonNull(request));
        this.storageService = Objects.requireNonNull(storageService);
        this.cognitoAuthProvider = cognitoAuthProvider;
        this.onProgress = Objects.requireNonNull(onProgress);
        this.onSuccess = Objects.requireNonNull(onSuccess);
        this.onError = Objects.requireNonNull(onError);
        this.transferObserver = null;
    }

    @SuppressLint("SyntheticAccessor")
    @Override
    public void start() {
        // Only start if it hasn't already been started
        if (transferObserver != null) {
            return;
        }

        String currentIdentityId;

        try {
            currentIdentityId = cognitoAuthProvider.getIdentityId();
        } catch (StorageException exception) {
            onError.accept(exception);
            return;
        }

        String serviceKey = S3Keys.createServiceKey(
                getRequest().getAccessLevel(),
                getRequest().getTargetIdentityId() != null
                        ? getRequest().getTargetIdentityId()
                        : currentIdentityId,
                getRequest().getKey()
        );
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



aws-storage-s3/src/main/java/com/amplifyframework/storage/s3/operation/AWSS3StorageUploadInputStreamOperation.java [72:106]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            @NonNull Consumer<StorageException> onError
    ) {
        super(Objects.requireNonNull(request));
        this.storageService = Objects.requireNonNull(storageService);
        this.cognitoAuthProvider = cognitoAuthProvider;
        this.onProgress = Objects.requireNonNull(onProgress);
        this.onSuccess = Objects.requireNonNull(onSuccess);
        this.onError = Objects.requireNonNull(onError);
        this.transferObserver = null;
    }

    @SuppressLint("SyntheticAccessor")
    @Override
    public void start() {
        // Only start if it hasn't already been started
        if (transferObserver != null) {
            return;
        }

        String currentIdentityId;

        try {
            currentIdentityId = cognitoAuthProvider.getIdentityId();
        } catch (StorageException exception) {
            onError.accept(exception);
            return;
        }

        String serviceKey = S3Keys.createServiceKey(
                getRequest().getAccessLevel(),
                getRequest().getTargetIdentityId() != null
                        ? getRequest().getTargetIdentityId()
                        : currentIdentityId,
                getRequest().getKey()
        );
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



