FileServer
Secure, scalable file storage — declarative resource servers, source-generated upload methods and signed upload URLs, S3-backed, deployed into your own AWS.
Built for files of every shape and size.
Declarative resource servers
A partial class with [ResourceServer], [AcceptedFileTypes] and [FileUploadSettings] sets where files live, the types it takes, and its size and count caps.
[ResourceServer] Generated methods
Each server gets typed upload, replace and list-by-owner methods named after the class. Override one only when you need a hook.
UploadItemAsync() Direct-to-S3 uploads
Add [SignedUrlUpload] and the server hands out a signed upload URL instead, so the bytes go straight to your bucket. A finalize call moves them into place.
GenerateItemUploadUrlAsync() Content validation
Opt in with [FileValidation]: magic-byte checks, JPEG EXIF stripping, SVG sanitising, and rejecting PDF JavaScript or Office macros. Or plug in your own validator.
IFileContentValidator Scoped to an owner
Files sit in a Public or Private location. Every lookup is keyed by the owner’s id, and a delete checks the owner first.
StorageLocation.Private Lifecycle expiration
Switch expiry on and stored files are deleted after the days you set, with incomplete multipart uploads swept too. No infrastructure change.
EnableLifecycleExpiration Inside your service.
On Lambda or in any container.
FileServer is a .NET library, not a service you call. Add the package, register it in Program.cs, and it runs inside your own service, in process. Ship that service as a Lambda function or as your own container on ECS, EKS or App Runner — the module goes wherever your code goes.
- ✓ In process: your code calls the module directly — no sidecar, no extra network hop
- ✓ Built from your code: your image or Lambda package, patched on your schedule
- ✓ Configured in
Program.cs, with values from your own settings
Kanject.Program.cs, and exposes a typed API the rest of your service can use immediately.
Simplify your cloud
journey today.
Join forward-thinking developers and businesses who trust Kanject to eliminate cloud complexity and accelerate innovation.