Make cache timeout configurable
sebhaase opened this issue · 6 comments
sebhaase commented
After some debugging I realised that there is a cache timeout fixed at 3600.
Please make this configurable in settings as
FILE_FORM_CACHE_TIMEOUT = 3600
I have big files and a slow network ;-)
mbraak commented
I'll have a look.
sebhaase commented
BTW, the error is here:
```
File ".../site-packages/django_file_form/views/tus.py" in patch
152. file_size =
int(cache.get("tus-uploads/{}/file_size".format(resource_id)))
Exception Type: TypeError at
/upload/upload/a04ef50f-3e0d-428e-ab55-ce1801d74b3b
Exception Value: int() argument must be a string, a bytes-like object or a
number, not 'NoneType'
```
sebhaase commented
I cannot test ist right now, but from the look of it, should it be ok. One should probably put this default of 1h timeout somewhere more prominently in the readme also. And/or change the default to 24h - meaning one would rather actively decide to set lower values, than wondering why it fails after 1h...
mbraak commented
I changed the default to 24 hours.
mbraak commented
The pr is merged. Closing this issue.