Search in sources :

Example 1 with AWSS3StorageGetPresignedUrlRequest

use of com.amplifyframework.storage.s3.request.AWSS3StorageGetPresignedUrlRequest in project amplify-android by aws-amplify.

the class AWSS3StoragePlugin method getUrl.

@NonNull
@Override
public StorageGetUrlOperation<?> getUrl(@NonNull String key, @NonNull StorageGetUrlOptions options, @NonNull Consumer<StorageGetUrlResult> onSuccess, @NonNull Consumer<StorageException> onError) {
    AWSS3StorageGetPresignedUrlRequest request = new AWSS3StorageGetPresignedUrlRequest(key, options.getAccessLevel() != null ? options.getAccessLevel() : defaultAccessLevel, options.getTargetIdentityId(), options.getExpires() != 0 ? options.getExpires() : defaultUrlExpiration);
    AWSS3StorageGetPresignedUrlOperation operation = new AWSS3StorageGetPresignedUrlOperation(storageService, executorService, cognitoAuthProvider, request, awsS3StoragePluginConfiguration, onSuccess, onError);
    operation.start();
    return operation;
}
Also used : AWSS3StorageGetPresignedUrlOperation(com.amplifyframework.storage.s3.operation.AWSS3StorageGetPresignedUrlOperation) AWSS3StorageGetPresignedUrlRequest(com.amplifyframework.storage.s3.request.AWSS3StorageGetPresignedUrlRequest) NonNull(androidx.annotation.NonNull)

Aggregations

NonNull (androidx.annotation.NonNull)1 AWSS3StorageGetPresignedUrlOperation (com.amplifyframework.storage.s3.operation.AWSS3StorageGetPresignedUrlOperation)1 AWSS3StorageGetPresignedUrlRequest (com.amplifyframework.storage.s3.request.AWSS3StorageGetPresignedUrlRequest)1