Add environment variable to set default upload expiry time

See https://github.com/timvisee/ffsend/issues/124
This commit is contained in:
timvisee 2021-04-09 14:32:13 +02:00
parent d75e69841e
commit ce5d31e546
No known key found for this signature in database
GPG key ID: B8DB720BC383E172
2 changed files with 2 additions and 0 deletions

View file

@ -545,6 +545,7 @@ to command line arguments:
| `FFSEND_HOST` | `--host <URL>` | Upload host | | `FFSEND_HOST` | `--host <URL>` | Upload host |
| `FFSEND_TIMEOUT` | `--timeout <SECONDS>` | Request timeout (0 to disable) | | `FFSEND_TIMEOUT` | `--timeout <SECONDS>` | Request timeout (0 to disable) |
| `FFSEND_TRANSFER_TIMEOUT` | `--transfer-timeout <SECONDS>` | Transfer timeout (0 to disable) | | `FFSEND_TRANSFER_TIMEOUT` | `--transfer-timeout <SECONDS>` | Transfer timeout (0 to disable) |
| `FFSEND_EXPIRY_TIME` | `--expiry-time <SECONDS>` | Default upload expiry time |
| `FFSEND_API` | `--api <VERSION>` | Server API version, `-` to lookup | | `FFSEND_API` | `--api <VERSION>` | Server API version, `-` to lookup |
| `FFSEND_BASIC_AUTH` | `--basic-auth <USER:PASSWORD>` | Basic HTTP authentication credentials to use. | | `FFSEND_BASIC_AUTH` | `--basic-auth <USER:PASSWORD>` | Basic HTTP authentication credentials to use. |

View file

@ -75,6 +75,7 @@ impl CmdArg for ArgExpiryTime {
.alias("expire") .alias("expire")
.alias("expiry") .alias("expiry")
.value_name("TIME") .value_name("TIME")
.env("FFSEND_EXPIRY_TIME")
.help("The file expiry time") .help("The file expiry time")
} }
} }