/// <inheritdoc /> public async Task <Stream> RetrieveAsync(RemoteFileStoreContext context, CancellationToken cancellationToken) { var ctx = (SimpleStorageServiceContext)context; var request = new GetObjectRequest { BucketName = ctx.BucketName, Key = ctx.FilePath, }; var response = await this.Client.GetObjectAsync(request, cancellationToken) .ConfigureAwait(false); if (response.HttpStatusCode == HttpStatusCode.OK) { return(response.ResponseStream); } throw new InvalidOperationException(); }
protected SimpleStorageServiceContext(RemoteFileStoreContext clone) : base(clone) { }