Bläddra i källkod

Add environment variable to set default upload expiry time

See https://github.com/timvisee/ffsend/issues/124
timvisee 4 år sedan
förälder
incheckning
ce5d31e546
2 ändrade filer med 2 tillägg och 0 borttagningar
  1. 1 0
      README.md
  2. 1 0
      src/cmd/arg/expiry_time.rs

+ 1 - 0
README.md

@@ -545,6 +545,7 @@ to command line arguments:
 | `FFSEND_HOST`             | `--host <URL>`                 | Upload host                                   |
 | `FFSEND_TIMEOUT`          | `--timeout <SECONDS>`          | Request 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_BASIC_AUTH`       | `--basic-auth <USER:PASSWORD>` | Basic HTTP authentication credentials to use. |
 

+ 1 - 0
src/cmd/arg/expiry_time.rs

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