How to start
How to install:
git clone https://github.com/gufi2115/Microservice-to-save-files.git
cd Microservice-to-save-files/
nano .env
paste it:
SECRET_KEY=
DATABASE_NAME=
DATABASE_USER=
DATABASE_PASSWORD=
DATABASE_HOST=
DATABASE_PORT=
API_KEY=
HOST=
API_PORT=
DEBUG=true/false
SWAGGER_DOCUMENTATION=true/false
docker compose up --build
Endpoints
Post file
Post /api/file/
| Name | Type | Required |
|---|---|---|
file |
file |
Required in header. Authorization: f"api-key {API_KEY}" |
Get item
GET /api/file/{id}/
| Name | Type | Required |
|---|---|---|
file |
file |
Required in header. Authorization: f"api-key {API_KEY}" |
Delete item
DELETE /api/file/{id}/
Docs OpenAPI
If you have SWAGGER_DOCUMENTATION on True
/api/docs/swagger/
/api/docs/redoc/