This project is a File Upload backend designed to be plug and play(just pull the docker image and deploy). I built it as a step to ease workload for developers building MircroServices.
Kindly leave a star and share so others who may find it useful.
Feel free to open issues and leave PRs.
Table of Contents
- PreRequisites
- Setup
- Setup for S3
- Setup for Cloudinary
- Usage
- Testing
- TODOs
- NOTE
PreRequisites
- Cloudinary Account (Optional)
- CLOUDINARY_API_ENVIRONMENT_VARIABLE
- CLOUDINARY_API_SECRET
- AWS S3 Account(Optional)
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_REGION
- MongoDB URL(Required)
- Docker Installed on Server/Local Machine
Setup
- Setup environment variables. See env.example
Usage
docker pull brymes/reusable-file-upload-service:stabledocker run --platform=linux/amd64 --env-file .env reusable-file-upload-service- Kindly find the Postman API Documentation at this link
Testing
- WIP
TODOs
- Unit tests
- CallBack URLs
- Add new services
- Azure Blob Storage
- Google Cloud Storage
- Authentication workflow (A POC for how to use in a Microservice Environent)
- Empty upload folder after upload complete
- Consider using goroutines to perform uploads in background
- Error management with Sentry or similar/ distributing logs
- Eager transformations for Cloudinary
NOTE
Tags always get parsed as strings