edihasaj / tuspy-fast-api

MIT License
20 stars 9 forks source link

lazy creation of tus api router with create_api_router #3

Closed max-l closed 1 year ago

max-l commented 1 year ago

Unhardcode variables files_dir, location and max_size, with the function tus.create_api_router

from tusserver import tus

app.include_router(
    tus.create_api_router(
        files_dir='/tmp/filezz',
        location='http://127.0.0.1:8000/files',
        max_size=128849018880
    ),
    prefix="/files"
)
edihasaj commented 1 year ago

I will review this and let you know, I will also check the callback functionality to add. Thanks again for your contribution 🙌