frontend - https://github.com/tempfiles-Team/tempfiles-frontend
tempfiles-backend is a backend for tempfiles-frontend.
docker build -t tempfiles-backend .
or pull image from docker hub
docker pull minpeter/tempfiles-backend
docker run -dp 5000:5000 \
-e JWT_SECRET=<your secret> \
-e DB_TYPE=sqlite \
-v $(pwd)/backend-data:/tmp \
tempfiles-backend
- config .env file
key | value | description |
---|---|---|
JWT_SECRET | jwt secret | |
DB_TYPE | sqlite or postgres | select db |
key | value | description |
---|---|---|
BACKEND_PORT | 5000 | If you want to change the backend port |
DB_HOST | localhost | If postgres is selected, its db ip or hostname |
DB_PORT | 5432 | If postgres is selected, its db port |
DB_NAME | tempdb | If postgres is selected, its db table name |
DB_USER | tempdb | If postgres is selected, its db user name |
DB_PASSWORD | tempdb | If postgres is selected, its db user password |
- run server
go run .
-
ํ์ผ ๋ชฉ๋ก ์กฐํ [Get] https://api.tmpf.me/list
-
ํ์ผ ์ ๋ก๋ [Post]
multipart/form-data "file" ํ๋์ ์ ๋ก๋ํ ํ์ผ์ ๋ฃ์ด์ ์์ฒญ
https://api.tmpf.me/upload -
ํ์ผ ๋ค์ด๋ก๋ [Get] https://api.tmpf.me/dl/(file_id)
-
ํ์ผ ์ญ์ [Delete] https://api.tmpf.me/del/(file_id)