https://github.com/sysnee/nest-storage
Simple Nest.js Static File Service
https://github.com/sysnee/nest-storage
api javascript nestjs nodejs rest static-files static-files-server storage-engine
Last synced: 2 months ago
JSON representation
Simple Nest.js Static File Service
- Host: GitHub
- URL: https://github.com/sysnee/nest-storage
- Owner: sysnee
- Created: 2025-09-11T15:43:05.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2026-02-20T21:08:17.000Z (4 months ago)
- Last Synced: 2026-02-21T02:24:00.204Z (4 months ago)
- Topics: api, javascript, nestjs, nodejs, rest, static-files, static-files-server, storage-engine
- Language: TypeScript
- Homepage:
- Size: 96.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Storage Bucket Service
A Nest.js application that provides S3-like storage bucket functionality for file upload, download, and management.
## Features
- **File Upload**: Upload files with validation (size, type)
- **File Download**: Download files by ID
- **File Metadata**: Get file information without downloading
- **File Deletion**: Delete files by ID
- **File Listing**: List all uploaded files with pagination
- **Health Check**: Service health monitoring
- **Swagger Documentation**: API documentation at `/api`
## API Endpoints
### Upload File
```
POST /storage/upload
Content-Type: multipart/form-data
Body: file (multipart file)
```
### Download File
```
GET /storage/files/{id}
```
### Get File Info
```
GET /storage/files/{id}/info
```
### Delete File
```
DELETE /storage/files/{id}
```
### List Files
```
GET /storage/files?limit=10&offset=0
```
### Health Check
```
GET /storage/health
```
## File Restrictions
- **Max Size**: 100MB
- **Allowed Types**:
- Images: JPEG, PNG, GIF, WebP
- Documents: PDF, TXT, JSON
- Archives: ZIP
- Media: MP4, MP3
## Installation
```bash
npm install
```
## Development
```bash
npm run start:dev
```
## Production
```bash
npm run build
npm run start:prod
```
## Docker
```bash
docker-compose up -d
```
## API Documentation
Visit `http://localhost:3000/api` for Swagger documentation.