A scalable ASP.NET Core service for uploading, storing, and managing files using AWS S3 cloud storage.
This service is designed to support media handling for backend systems such as chat applications, messaging platforms, and content management systems.
- Built using ASP.NET Core Web API
- AWS S3 Cloud Storage Integration
- Secure File Upload Handling
- Media URL Generation
- Reusable Backend Utility Service
- Environment-based Configuration
- Upload images and files to AWS S3
- Generate accessible file URLs
- Support multiple file types
- AWS S3 Bucket Integration
- Secure credential configuration
- Scalable cloud-based file handling
- RESTful upload endpoint
- Easy integration with other backend services
- Media support for real-time chat systems
- File validation before upload
- Environment variable based secret management
- Secure AWS credential handling
Client → API Endpoint → BlobService → AWS S3 Bucket → File URL Response
This project follows a clean service-based architecture:
Controller → Service → AWS S3
- Handle HTTP requests and responses
- Manage file upload logic and AWS S3 interaction
- Stores uploaded media securely in cloud storage
- ASP.NET Core Web API
- C#
- AWS S3
- Dependency Injection
- REST APIs
- Cloud Storage
- Environment Configuration
| Method | Endpoint | Description |
|---|---|---|
| POST | Blob/files/upload |
Upload image/file to AWS S3 |
POST Blob/files/upload
Content-Type: multipart/form-data{
"success": true,
"message": "Files uploaded successfully",
"data": {
"totalFiles": 1,
"messages": [
{
"messageId": "12345",
"FilePath": "uploads/2026/05/image.png",
"FileUrl": "https://bucket.s3.amazonaws.com/image.png",
"FileDownloadUrl": "https://bucket.s3.amazonaws.com/image.png?download=true",
"originalFileName": "image.png",
"fileType": "image",
"contentType": "image/png",
"fileSizeBytes": 102400
}
]
}
}git clone https://github.com/keyu04/BlobService.git
cd BlobServicedotnet restoreUpdate AWS configuration inside appsettings.Production.json:
{
"AWS": {
"BucketName": "your-bucket-name",
"AccessKey": "YOUR_ACCESS_KEY",
"SecretKey": "YOUR_SECRET_KEY",
"Region": "your-region"
}
}dotnet run- File size validation
- Image compression
- Pre-signed URL support
- Multiple bucket support
- Docker containerization
- Chat applications
- Messaging platforms
- User profile image upload
- Document management systems
- Media storage services
- .NET SDK 8.0 or higher
- AWS Account
- AWS S3 Bucket
- Visual Studio 2022 / VS Code
Developed by Keyur Halpati
GitHub: https://github.com/keyu04