Initial commit
This commit is contained in:
67
cmd/server/config.toml
Normal file
67
cmd/server/config.toml
Normal file
@ -0,0 +1,67 @@
|
||||
# Server Settings
|
||||
[server]
|
||||
ListenPort = "8080"
|
||||
UnixSocket = false
|
||||
StoreDir = "./testupload"
|
||||
LogLevel = "info"
|
||||
LogFile = "./hmac-file-server.log"
|
||||
MetricsEnabled = true
|
||||
MetricsPort = "9090"
|
||||
FileTTL = "8760h"
|
||||
|
||||
# Workers and Connections
|
||||
[workers]
|
||||
NumWorkers = 2
|
||||
UploadQueueSize = 500
|
||||
|
||||
# Timeout Settings
|
||||
[timeouts]
|
||||
ReadTimeout = "600s"
|
||||
WriteTimeout = "600s"
|
||||
IdleTimeout = "600s"
|
||||
|
||||
# Security Settings
|
||||
[security]
|
||||
Secret = "a-orc-and-a-humans-is-drinking-ale"
|
||||
|
||||
# Versioning Settings
|
||||
[versioning]
|
||||
EnableVersioning = false
|
||||
MaxVersions = 1
|
||||
|
||||
# Upload/Download Settings
|
||||
[uploads]
|
||||
ResumableUploadsEnabled = true
|
||||
ChunkedUploadsEnabled = true
|
||||
ChunkSize = 16777216
|
||||
AllowedExtensions = [
|
||||
# Document formats
|
||||
".txt", ".pdf",
|
||||
|
||||
# Image formats
|
||||
".png", ".jpg", ".jpeg", ".gif", ".bmp", ".tiff", ".svg", ".webp",
|
||||
|
||||
# Video formats
|
||||
".wav", ".mp4", ".avi", ".mkv", ".mov", ".wmv", ".flv", ".webm", ".mpeg", ".mpg", ".m4v", ".3gp", ".3g2",
|
||||
|
||||
# Audio formats
|
||||
".mp3", ".ogg"
|
||||
]
|
||||
|
||||
# ClamAV Settings
|
||||
[clamav]
|
||||
ClamAVEnabled = false
|
||||
ClamAVSocket = "/var/run/clamav/clamd.ctl"
|
||||
NumScanWorkers = 4
|
||||
|
||||
# Redis Settings
|
||||
[redis]
|
||||
RedisEnabled = false
|
||||
RedisAddr = "localhost:6379"
|
||||
RedisPassword = ""
|
||||
RedisDBIndex = 0
|
||||
RedisHealthCheckInterval = "120s"
|
||||
|
||||
# Deduplication
|
||||
[deduplication]
|
||||
enabled = false
|
1923
cmd/server/main.go
Normal file
1923
cmd/server/main.go
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user