Storage Module
Unified file storage API across cloud providers. Upload, download, and manage files with a consistent interface.
Why Use Primus Storage?
Cloud storage SDKs have different APIs. Primus Storage provides a unified interface with automatic tenant isolation.
// Same API for Azure, S3, or local filesystem
await storage.UploadAsync("documents/report.pdf", stream);
Supported Providers
Azure Blob
Microsoft Azure Blob Storage integration.
AzureSAS URLs
AWS S3
Amazon S3 with pre-signed URL support.
AWSPre-Signed
Local Filesystem
Development-friendly local file storage.
DevLocal
Result Object (IStorageProvider)
| Method | Returns | Description |
|---|---|---|
UploadAsync() | Task | Upload file to path |
DownloadAsync() | Task<Stream> | Download file stream |
DeleteAsync() | Task | Delete file |
ListAsync() | Task<IReadOnlyList<StorageItem>> | List files by prefix |
GetUrlAsync() | Task<string> | Get pre-signed URL |
ExistsAsync() | Task<bool> | Check if file exists |
StorageItem Properties
| Property | Type | Description |
|---|---|---|
Path | string | Full file path |
Size | long | File size in bytes |
LastModified | DateTime | Last modification time |
ContentType | string? | MIME type |
Examples
Quick Install
dotnet add package PrimusSaaS.Storage
Next Steps
| Want to... | See Guide |
|---|---|
| Get started | Quick Start |
| Tenant isolation | Multi-Tenant |