mirror of
https://git.0x0.st/mia/0x0.git
synced 2024-11-22 08:57:11 +01:00
README: Clarify why serving file requests from the app is bad
This commit is contained in:
parent
4ba18146e1
commit
b5f0cfdf6f
1 changed files with 4 additions and 2 deletions
|
@ -30,8 +30,10 @@ where ``/up`` is whatever you’ve configured as ``FHOST_STORAGE_PATH``.
|
||||||
|
|
||||||
For all other servers, set ``FHOST_USE_X_ACCEL_REDIRECT`` to ``False`` and
|
For all other servers, set ``FHOST_USE_X_ACCEL_REDIRECT`` to ``False`` and
|
||||||
``USE_X_SENDFILE`` to ``True``, assuming your server supports this.
|
``USE_X_SENDFILE`` to ``True``, assuming your server supports this.
|
||||||
Otherwise, Flask will serve the file with chunked encoding, which sucks and
|
Otherwise, Flask will serve the file with chunked encoding, which has several
|
||||||
should be avoided at all costs.
|
downsides, one of them being that range requests will not work. This is a
|
||||||
|
problem for example when streaming media files: It won’t be possible to seek,
|
||||||
|
and some ISOBMFF (MP4) files will not play at all.
|
||||||
|
|
||||||
To make files expire, simply create a cronjob that runs ``cleanup.py`` every
|
To make files expire, simply create a cronjob that runs ``cleanup.py`` every
|
||||||
now and then.
|
now and then.
|
||||||
|
|
Loading…
Reference in a new issue