2.4-stable release
This commit is contained in:
parent
011f54829a
commit
e8af2d127b
@ -1,35 +1,35 @@
|
|||||||
[server]
|
[server]
|
||||||
bind_ip = "127.0.0.1"
|
#bind_ip = "127.0.0.1"
|
||||||
listenport = "8080"
|
listenport = "8080"
|
||||||
unixsocket = false
|
unixsocket = false
|
||||||
storagepath = "/mnt/nfs_vol01/hmac-file-server/data/"
|
storagepath = "./uploads/"
|
||||||
metricsenabled = true
|
metricsenabled = true
|
||||||
metricsport = "9090"
|
metricsport = "9090"
|
||||||
deduplicationenabled = true
|
deduplicationenabled = true
|
||||||
minfreebytes = "5GB"
|
minfreebytes = "5GB"
|
||||||
filettl = "2y"
|
filettl = "2y"
|
||||||
filettlenabled = true
|
filettlenabled = false
|
||||||
autoadjustworkers = true
|
autoadjustworkers = true
|
||||||
networkevents = false
|
networkevents = false
|
||||||
pidfilepath = "./hmac-file-server.pid"
|
pidfilepath = "./hmac-file-server.pid"
|
||||||
precaching = true
|
precaching = false
|
||||||
#globalextensions = ["*"]
|
#globalextensions = ["*"]
|
||||||
|
|
||||||
[deduplication]
|
[deduplication]
|
||||||
enabled = true
|
enabled = true
|
||||||
directory = "/mnt/nfs_vol01/hmac-file-server/deduplication/"
|
directory = "./deduplication/"
|
||||||
|
|
||||||
[logging]
|
[logging]
|
||||||
level = "debug"
|
level = "debug"
|
||||||
file = "/var/log/hmac-file-server.log"
|
file = "./hmac-file-server.log"
|
||||||
max_size = 100
|
max_size = 100
|
||||||
max_backups = 7
|
max_backups = 7
|
||||||
max_age = 30
|
max_age = 30
|
||||||
compress = true
|
compress = true
|
||||||
|
|
||||||
[thumbnails]
|
[thumbnails]
|
||||||
enabled = true
|
enabled = false
|
||||||
directory = "/mnt/nfs_vol01/hmac-file-server/thumbnails/"
|
directory = "./thumbnails/"
|
||||||
size = "200x200"
|
size = "200x200"
|
||||||
thumbnailintervalscan = "1h"
|
thumbnailintervalscan = "1h"
|
||||||
concurrency = 5
|
concurrency = 5
|
||||||
@ -74,7 +74,7 @@ allowedextensions = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[clamav]
|
[clamav]
|
||||||
clamavenabled = true
|
clamavenabled = false
|
||||||
clamavsocket = "/var/run/clamav/clamd.ctl"
|
clamavsocket = "/var/run/clamav/clamd.ctl"
|
||||||
numscanworkers = 4
|
numscanworkers = 4
|
||||||
scanfileextensions = [
|
scanfileextensions = [
|
||||||
@ -83,7 +83,7 @@ scanfileextensions = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[redis]
|
[redis]
|
||||||
redisenabled = true
|
redisenabled = false
|
||||||
redisdbindex = 0
|
redisdbindex = 0
|
||||||
redisaddr = "localhost:6379"
|
redisaddr = "localhost:6379"
|
||||||
redispassword = ""
|
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")
|
log.WithFields(logrus.Fields{"file": absFilename}).Info("File uploaded and processed successfully")
|
||||||
|
|
||||||
uploadDuration.Observe(time.Since(startTime).Seconds())
|
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 (
|
const (
|
||||||
serverURL = "http://[::1]:8080" // Replace with your actual server URL
|
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
|
uploadPath = "hmac_icon.png" // Test file to upload
|
||||||
protocolType = "v2" // Use v2, v, or token as needed
|
protocolType = "v2" // Use v2, v, or token as needed
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user