From 7cc5ab1e796aef5c2103f76915d6139b80ea4794 Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Tue, 25 Jul 2023 00:52:08 +0200 Subject: README.md: Inform about -t command line option --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/README.md b/README.md index 9d8c583..b583d04 100644 --- a/README.md +++ b/README.md @@ -173,6 +173,27 @@ command line option. For example: slcl -p 7822 ~/my-db/ ``` +`slcl` requires a temporary directory where files uploaded by users are +temporarily stored until moved to the user directory. By default, `slcl` +attempts to retrieve the path to the temporary directory by inspecting the +`TMPDIR` environment variable, and falls back to `/tmp` (which is common +among Unix-like operating systems such as GNU/Linux, although not defined +by POSIX) if undefined. + +If a custom temporary directory is required, it can be defined via command +line option `-t`. For example: + +```sh +slcl -t ~/my-tmp -p 7822 ~/my-db +``` + +**Note:** system-level temporary directories such as `/tmp` might reside +on a filesytem different than the one where the database resides. This +would force `slcl` to copy the contents from uploaded files from the +temporary directory to the database, which might be an expensive operation. +Therefore, in order to avoid expensive copies, define a custom temporary +directory that resides on the same filesystem. + ## Why this project? Previously, I had been recommended Nextcloud as an alternative to proprietary -- cgit v1.2.3