Table of Contents

Class S3ObjectKeyExtractor

Namespace
Builvero.Application.Utilities
Assembly
Builvero.Application.dll

Utility class for extracting S3 object keys from stored values. Handles various formats: full S3 URLs, presigned URLs, and object keys.

public static class S3ObjectKeyExtractor
Inheritance
S3ObjectKeyExtractor
Inherited Members

Methods

ExtractObjectKey(string?)

Extracts the S3 object key from a stored value, which may be:

public static string? ExtractObjectKey(string? storedValue)

Parameters

storedValue string

The stored value from the database

Returns

string

The extracted object key, or null if the value is not a valid S3 reference

IsExternalUrl(string?)

Checks if a URL is an external URL (not an S3 URL). External URLs are URLs that don't match S3 patterns and should be returned as-is.

public static bool IsExternalUrl(string? url)

Parameters

url string

The URL to check

Returns

bool

True if the URL is an external URL (not S3), false otherwise