ArgosiLabs.Freyt.Client 0.2.0

This package has a SemVer 2.0.0 package version: 0.2.0+1.
dotnet add package ArgosiLabs.Freyt.Client --version 0.2.0
                    
NuGet\Install-Package ArgosiLabs.Freyt.Client -Version 0.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ArgosiLabs.Freyt.Client" Version="0.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ArgosiLabs.Freyt.Client" Version="0.2.0" />
                    
Directory.Packages.props
<PackageReference Include="ArgosiLabs.Freyt.Client" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ArgosiLabs.Freyt.Client --version 0.2.0
                    
#r "nuget: ArgosiLabs.Freyt.Client, 0.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ArgosiLabs.Freyt.Client@0.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ArgosiLabs.Freyt.Client&version=0.2.0
                    
Install as a Cake Addin
#tool nuget:?package=ArgosiLabs.Freyt.Client&version=0.2.0
                    
Install as a Cake Tool

ArgosiLabs.Freyt.Client

A lightweight C# client SDK for Freyt, providing presigned upload and download URLs via gRPC.

The client is designed to issue presigned URLs for client-side uploads and downloads, with automatic path-prefix routing for multi-tenant architectures and zero boilerplate.


Features

  • Direct gRPC Power: Inherits directly from FileUrlsServiceClient—supports deadlines, cancellation tokens, metadata/headers, and future proto updates out of the box without wrapper code.
  • Automatic Path Prefixes: Configure a basePathPrefix (e.g. tenant-123) once; all upload requests are automatically routed under that prefix via a gRPC interceptor.
  • Built-in Channel Lifecycle: Manages internal GrpcChannel connections cleanly via IDisposable and IAsyncDisposable, or binds directly to existing channels/invokers in ASP.NET Core DI.

Installation

dotnet add package ArgosiLabs.Freyt.Client

Quickstart

1. Initialize the Client

using ArgosiLabs.Freyt.Client;

// With a base prefix (e.g. tenant or organization scope):
await using var client = new FreytClient("http://localhost:18182", basePathPrefix: "tenant-123");

// Or using options:
await using var client = new FreytClient(new FreytClientOptions
{
    ServerAddress = "http://localhost:18182",
    BasePathPrefix = "tenant-123"
});

2. Request an Upload URL

The client issues presigned upload URLs. Your web client or frontend then performs the actual file upload (e.g. via multipart POST).

using FileUrls.V1;

var response = await client.GetFileUploadUrlAsync(new GetFileUploadUrlRequest
{
    // "avatars" is automatically combined with "tenant-123" -> "tenant-123/avatars"
    PathPrefix = "avatars",
    MaxSize = 10 * 1024 * 1024, // 10 MB limit
    ExpectedMime = "image/png",
    ExpiresAt = DateTime.UtcNow.AddMinutes(15).ToString("yyyy-MM-dd'T'HH:mm:ss'Z'")
});

Console.WriteLine($"Upload URL: {response.Url}");

3. Request a Download URL

Generate a presigned, single-use or time-limited download URL for a file UUID:

var response = await client.GetFileDownloadUrlAsync(new GetFileDownloadUrlRequest
{
    FileUUID = "your-file-uuid",
    ExpiresAt = DateTime.UtcNow.AddMinutes(5).ToString("yyyy-MM-dd'T'HH:mm:ss'Z'"),
    CacheUntilSecs = 3600 // Sets 'Cache-Control: private, max-age=3600' on the download
});

Console.WriteLine($"Download URL: {response.Url}");

4. Delete a File

Direct file management is accessible through the Files property:

using Files.V1;

await client.Files.DeleteAsync(new DeleteRequest
{
    FileUUID = "your-file-uuid"
});

Dependency Injection (ASP.NET Core)

You can register FreytClient in your service collection using an existing GrpcChannel or CallInvoker:

services.AddSingleton(sp =>
{
    var channel = GrpcChannel.ForAddress("http://localhost:18182");
    return new FreytClient(channel, basePathPrefix: "tenant-default");
});

License

MIT

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.0 31 9/24/2026
0.1.0 27 9/24/2026