rustypaste-pretty/config.toml
Orhun Parmaksız dd91c50d50
feat(server): support auto-deletion of expired files (#17)
feat(server): support auto-deletion of expired files (#17)

chore(ci): set the number of test threads to 1

feat(config): allow the real-time update of cleanup routine

docs(readme): update README.md about deleting expired files
2022-03-23 16:13:46 +03:00

30 lines
919 B
TOML

[config]
refresh_rate="1s"
[server]
address="127.0.0.1:8000"
#workers=4
max_content_length="10MB"
upload_path="./upload"
timeout="30s"
[paste]
random_url = { enabled = true, type = "petname", words = 2, separator = "-" }
#random_url = { enabled = true, type = "alphanumeric", length = 8 }
default_extension = "txt"
mime_override = [
{ mime = "image/jpeg", regex = "^.*\\.jpg$" },
{ mime = "image/png", regex = "^.*\\.png$" },
{ mime = "image/svg+xml", regex = "^.*\\.svg$" },
{ mime = "video/webm", regex = "^.*\\.webm$" },
{ mime = "video/x-matroska", regex = "^.*\\.mkv$" },
{ mime = "application/octet-stream", regex = "^.*\\.bin$" },
{ mime = "text/plain", regex = "^.*\\.(log|txt|diff)$" },
]
mime_blacklist = [
"application/x-dosexec",
"application/java-archive",
"application/java-vm"
]
duplicate_files = false
delete_expired_files = { enabled = true, interval = "1h" }