root-gg / plik

Plik is a temporary file upload system (Wetransfer like) in Go.
https://plik.root.gg
Other
1.47k stars 168 forks source link

Introducing feature flags #434

Closed camathieu closed 2 years ago

camathieu commented 2 years ago

Introducing a more flexible way to manage Plik feature flags. Also introduce two new features :

# Feature flags to enable/disable Plik features.
#  - disabled : feature is always off
#  - enabled  : feature is opt-in
#  - default  : feature is opt-out
#  - forced   : feature is always on
FeatureAuthentication = "disabled"     # disabled -> no authentication / forced -> no anonymous upload / default -> enabled
FeatureOneShot        = "enabled"      # Upload with files that are automatically deleted after the first download
FeatureRemovable      = "enabled"      # Upload with files that anybody can delete
FeatureStream         = "enabled"      # Upload with files that are not stored on the server
FeaturePassword       = "enabled"      # Upload that are protected by HTTP basic auth login/password
FeatureComments       = "enabled"      # Upload with markdown comments / forced -> default
FeatureSetTTL         = "enabled"      # Upload TTL is always set to default / enabled == default == forced
FeatureExtendTTL      = "disabled"     # Extend upload expiration date by TTL each time it is accessed
camathieu commented 2 years ago

https://github.com/root-gg/plik/issues/425