use of com.amplifyframework.storage.s3.operation.AWSS3StorageDownloadFileOperation in project amplify-android by aws-amplify.
the class AWSS3StoragePlugin method downloadFile.
@NonNull
@Override
public StorageDownloadFileOperation<?> downloadFile(@NonNull String key, @NonNull File local, @NonNull StorageDownloadFileOptions options, @NonNull Consumer<StorageTransferProgress> onProgress, @NonNull Consumer<StorageDownloadFileResult> onSuccess, @NonNull Consumer<StorageException> onError) {
AWSS3StorageDownloadFileRequest request = new AWSS3StorageDownloadFileRequest(key, local, options.getAccessLevel() != null ? options.getAccessLevel() : defaultAccessLevel, options.getTargetIdentityId());
AWSS3StorageDownloadFileOperation operation = new AWSS3StorageDownloadFileOperation(storageService, cognitoAuthProvider, request, awsS3StoragePluginConfiguration, onProgress, onSuccess, onError);
operation.start();
return operation;
}
Aggregations