Class FileStorageClient
HTTP client that can be used to download and upload files from/to a server
public class FileStorageClient
- Inheritance
-
FileStorageClient
- Inherited Members
Constructors
FileStorageClient(HttpClient, ILogger<FileStorageClient>)
Initializes this object with the given HTTP client and logger
public FileStorageClient(HttpClient client, ILogger<FileStorageClient> logger)
Parameters
client
HttpClientHTTP client
logger
ILogger<FileStorageClient>logger
Methods
DownloadFileAsync(Uri, string)
Downloads the file from the provided uri
and saves
it in the provided filePath
public Task<bool> DownloadFileAsync(Uri uri, string filePath)
Parameters
Returns
UploadFileAsync(Uri, StreamContent)
Uploads a file to the provided uri
public Task UploadFileAsync(Uri uri, StreamContent fileStream)
Parameters
uri
UrifileStream
StreamContent