FileServerService 1.0.0
Additional Details
remove app
The owner has unlisted this package.
This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package FileServerService --version 1.0.0
NuGet\Install-Package FileServerService -Version 1.0.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="FileServerService" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FileServerService" Version="1.0.0" />
<PackageReference Include="FileServerService" />
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 FileServerService --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: FileServerService, 1.0.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 FileServerService@1.0.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=FileServerService&version=1.0.0
#tool nuget:?package=FileServerService&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
FileServerService
Enterprise-grade file server service with Redis caching, encryption, versioning, and comprehensive audit logging.
Features
- File Upload/Download: Secure file operations with encryption support
- Redis Caching: High-performance caching for improved performance
- File Versioning: Automatic version management for file updates
- Encryption: AES-GCM encryption for file content security
- Audit Logging: Comprehensive audit trail for all operations
- JWT Authentication: Secure authentication and authorization
- Health Checks: Built-in health monitoring
- Rate Limiting: Protection against abuse
- PostgreSQL Support: Robust database storage
- RabbitMQ Integration: Message queuing capabilities
Installation
dotnet add package FileServerService
Quick Start
1. Configure Services
// Program.cs
builder.Services.AddDbContext<FileServerDbContext>(options =>
options.UseNpgsql(builder.Configuration.GetConnectionString("DefaultConnection")));
builder.Services.AddStackExchangeRedisCache(options =>
options.Configuration = builder.Configuration.GetConnectionString("Redis"));
builder.Services.AddScoped<IFileRepository, FileRepository>();
builder.Services.AddScoped<IFileStorageService, LocalFileStorageService>();
builder.Services.AddScoped<ICacheService, RedisCacheService>();
builder.Services.AddScoped<IEncryptionService, AesGcmEncryptionService>();
builder.Services.AddScoped<IAuditLoggerService, AdvancedAuditLoggerService>();
2. Upload a File
var uploadCommand = new UploadFileCommand
{
FileName = "example.txt",
Content = fileStream,
ContentType = "text/plain",
ApplicationId = "my-app",
UserId = "user-123"
};
var result = await mediator.Send(uploadCommand);
3. Download a File
var downloadCommand = new DownloadFileCommand
{
FileId = fileId,
UserId = "user-123"
};
var fileResult = await mediator.Send(downloadCommand);
4. List Files
var listQuery = new ListFilesQuery
{
Page = 1,
PageSize = 10,
ApplicationId = "my-app"
};
var files = await mediator.Send(listQuery);
Configuration
appsettings.json
{
"ConnectionStrings": {
"DefaultConnection": "Host=localhost;Database=fileserver;Username=postgres;Password=password",
"Redis": "localhost:6379"
},
"FileStorage": {
"BasePath": "/app/files",
"MaxFileSize": 104857600
},
"Encryption": {
"Key": "your-32-byte-encryption-key-here"
},
"Cache": {
"DefaultExpirationMinutes": 120
}
}
API Endpoints
POST /api/v1/File/upload- Upload a fileGET /api/v1/File/download/{fileId}- Download a fileGET /api/v1/File/list- List files with paginationPUT /api/v1/File/update-metadata/{fileId}- Update file metadataDELETE /api/v1/File/{fileId}- Delete a fileGET /api/v1/File/stats- Get file statisticsGET /api/v1/File/isExists- Check if file exists
Dependencies
- .NET 9.0
- Entity Framework Core 9.0.7
- PostgreSQL (via Npgsql)
- Redis (via StackExchange.Redis)
- MediatR 13.0.0
- Ardalis.Result 10.1.0
License
MIT License - see LICENSE file for details.
Author
gokseldede (goksel.dede@anasigorta.com.tr)
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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.
-
net9.0
- FileServerService.Application (>= 1.0.0)
- FileServerService.Domain (>= 1.0.0)
- FileServerService.Shared (>= 1.0.0)
- Microsoft.AspNetCore.Authentication (>= 2.3.0)
- Microsoft.AspNetCore.Http (>= 2.3.0)
- Microsoft.EntityFrameworkCore (>= 9.0.7)
- Microsoft.Extensions.Caching.StackExchangeRedis (>= 9.0.7)
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.7)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.7)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.7)
- Npgsql.EntityFrameworkCore.PostgreSQL (>= 9.0.4)
- RabbitMQ.Client (>= 6.8.1)
- StackExchange.Redis (>= 2.8.41)
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 |
|---|