Skip to main content

ResQ.Storage

UploadResult Class

Represents the result of a file upload operation to IPFS.
public record UploadResult : System.IEquatable<ResQ.Storage.UploadResult>
Inheritance System.Object → UploadResult Implements System.IEquatable<UploadResult>

Example

var result = await storageClient.UploadAsync(stream, "evidence.jpg", "image/jpeg");
Console.WriteLine($"Uploaded to: {result.Cid}");
Console.WriteLine($"Size: {result.SizeBytes} bytes");
Console.WriteLine($"URL: {storageClient.GetGatewayUrl(result.Cid)}");

Remarks

This record contains all relevant information about an uploaded file, including its Content Identifier (CID), metadata, and pin status. The CID is the permanent address of the file on the IPFS network.
Constructors
UploadResult(string, string, long, string, bool, DateTimeOffset)Represents the result of a file upload operation to IPFS.
Properties
CidThe IPFS Content Identifier (CID) for the uploaded file.
ContentTypeThe MIME type of the file (e.g., “image/jpeg”, “video/mp4”).
FileNameThe original filename of the uploaded content.
IsPinnedTrue if the file has been pinned to ensure persistence.
SizeBytesThe size of the file in bytes.
TimestampUTC timestamp when the upload completed.