Search in sources :

Example 1 with AWSS3StorageDownloadFileOperation

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;
}
Also used : AWSS3StorageDownloadFileRequest(com.amplifyframework.storage.s3.request.AWSS3StorageDownloadFileRequest) AWSS3StorageDownloadFileOperation(com.amplifyframework.storage.s3.operation.AWSS3StorageDownloadFileOperation) NonNull(androidx.annotation.NonNull)

Aggregations

NonNull (androidx.annotation.NonNull)1 AWSS3StorageDownloadFileOperation (com.amplifyframework.storage.s3.operation.AWSS3StorageDownloadFileOperation)1 AWSS3StorageDownloadFileRequest (com.amplifyframework.storage.s3.request.AWSS3StorageDownloadFileRequest)1