This app is based on Django REST Framework. It allows users to upload images, generate thumbnails and expiring link depends on their account tier.
- Django and Django REST Framework
- PostgreSQL
- Celery
- Redis
- Pillow
- Docker
- docker-compose
- pytest
if you interested in details check requirements.txt file
- available only for logged in users
- users can upload images via HTTP
- users can list their uploaded images
- admin UI created via django-admin
- admins can create custom account tiers with the following things configurable:
- thumbnail size
- presence of the link to original file
- ability to create expiring link
- three built-in account tiers:
- users with
Basic
plan after uploading an image get:- a link to the thumbnail that's 200px height
- users with
Premium
plan after uploading an image get:- a link to the thumbnail that's 200px height
- a link to the thumbnail that's 400px height
- a link to the original file
- users with
Enterprise
plan after uploading an image get:- a link to the thumbnail that's 200px height
- a link to the thumbnail that's 400px height
- a link to the original file
- the ability to generate a link to the uploaded image that expires after several seconds (user can specify any number between 300 and 30000 seconds) and download it
- users with
- generated expiring link to download an image works for unauthorized users too
- caching and distributed task queue
The easiest way to start project locally is to run docker-compose.
- Clone this repo
- Change directory to repo root folder
- Run
docker-compose up --build
- Make databse migration:
docker-compose exec backend python manage.py migrate
- Create superuser:
docker-compose exec backend python manage.py createsuperuser
- Type admin username, email and password.
- Now you can visit:
127.0.0.1:8000/admin
orlocalhost:8000/admin
to log in to admin panel.