2.4-stable release
This commit is contained in:
parent
011f54829a
commit
e8af2d127b
@ -1,35 +1,35 @@
|
||||
[server]
|
||||
bind_ip = "127.0.0.1"
|
||||
#bind_ip = "127.0.0.1"
|
||||
listenport = "8080"
|
||||
unixsocket = false
|
||||
storagepath = "/mnt/nfs_vol01/hmac-file-server/data/"
|
||||
storagepath = "./uploads/"
|
||||
metricsenabled = true
|
||||
metricsport = "9090"
|
||||
deduplicationenabled = true
|
||||
minfreebytes = "5GB"
|
||||
filettl = "2y"
|
||||
filettlenabled = true
|
||||
filettlenabled = false
|
||||
autoadjustworkers = true
|
||||
networkevents = false
|
||||
pidfilepath = "./hmac-file-server.pid"
|
||||
precaching = true
|
||||
precaching = false
|
||||
#globalextensions = ["*"]
|
||||
|
||||
[deduplication]
|
||||
enabled = true
|
||||
directory = "/mnt/nfs_vol01/hmac-file-server/deduplication/"
|
||||
directory = "./deduplication/"
|
||||
|
||||
[logging]
|
||||
level = "debug"
|
||||
file = "/var/log/hmac-file-server.log"
|
||||
file = "./hmac-file-server.log"
|
||||
max_size = 100
|
||||
max_backups = 7
|
||||
max_age = 30
|
||||
compress = true
|
||||
|
||||
[thumbnails]
|
||||
enabled = true
|
||||
directory = "/mnt/nfs_vol01/hmac-file-server/thumbnails/"
|
||||
enabled = false
|
||||
directory = "./thumbnails/"
|
||||
size = "200x200"
|
||||
thumbnailintervalscan = "1h"
|
||||
concurrency = 5
|
||||
@ -74,7 +74,7 @@ allowedextensions = [
|
||||
]
|
||||
|
||||
[clamav]
|
||||
clamavenabled = true
|
||||
clamavenabled = false
|
||||
clamavsocket = "/var/run/clamav/clamd.ctl"
|
||||
numscanworkers = 4
|
||||
scanfileextensions = [
|
||||
@ -83,7 +83,7 @@ scanfileextensions = [
|
||||
]
|
||||
|
||||
[redis]
|
||||
redisenabled = true
|
||||
redisenabled = false
|
||||
redisdbindex = 0
|
||||
redisaddr = "localhost:6379"
|
||||
redispassword = ""
|
||||
|
1393
cmd/server/hmac-file-server.log
Normal file
1393
cmd/server/hmac-file-server.log
Normal file
File diff suppressed because it is too large
Load Diff
@ -1508,6 +1508,14 @@ func processUpload(task UploadTask) error {
|
||||
}
|
||||
}
|
||||
|
||||
// Generate thumbnail after deduplication
|
||||
thumbnailDir := conf.Thumbnails.Directory
|
||||
err = generateThumbnail(task.AbsFilename, thumbnailDir, conf.Thumbnails.Size)
|
||||
if err != nil {
|
||||
log.Errorf("Thumbnail generation failed for %s: %v", task.AbsFilename, err)
|
||||
return err // Return early to avoid logging processing completion
|
||||
}
|
||||
|
||||
log.WithFields(logrus.Fields{"file": absFilename}).Info("File uploaded and processed successfully")
|
||||
|
||||
uploadDuration.Observe(time.Since(startTime).Seconds())
|
||||
|
0
cmd/server/uploads/test-file-plc-holder
Normal file
0
cmd/server/uploads/test-file-plc-holder
Normal file
@ -16,7 +16,7 @@ import (
|
||||
|
||||
const (
|
||||
serverURL = "http://[::1]:8080" // Replace with your actual server URL
|
||||
secret = "a-orc-and-a-humans-is-drinking-ale" // Replace with your HMAC secret key
|
||||
secret = "hmac-file-server-is-the-win" // Replace with your HMAC secret key
|
||||
uploadPath = "hmac_icon.png" // Test file to upload
|
||||
protocolType = "v2" // Use v2, v, or token as needed
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user