aboutsummaryrefslogtreecommitdiff
path: root/weed/command/webdav.go
diff options
context:
space:
mode:
authorbukton <buk_ton2@hotmail.com>2020-04-19 00:21:45 +0700
committerbukton <buk_ton2@hotmail.com>2020-04-19 00:21:45 +0700
commit290c6b7f01f7b148a65ba10dd6536ad2567d7653 (patch)
treee1abb141849419c40691097eea032b944fcbd748 /weed/command/webdav.go
parent6234ea441b6388838a19635c656316047f42917d (diff)
parent11f5a6d91346e5f3cbf3b46e0a660e231c5c2998 (diff)
downloadseaweedfs-290c6b7f01f7b148a65ba10dd6536ad2567d7653.tar.xz
seaweedfs-290c6b7f01f7b148a65ba10dd6536ad2567d7653.zip
Merge remote-tracking branch 'origin/master' into filer_mongodb
# Conflicts: # go.mod # go.sum # weed/server/filer_server.go
Diffstat (limited to 'weed/command/webdav.go')
-rw-r--r--weed/command/webdav.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/weed/command/webdav.go b/weed/command/webdav.go
index 4f5d5f5ce..a1616d0fc 100644
--- a/weed/command/webdav.go
+++ b/weed/command/webdav.go
@@ -4,6 +4,7 @@ import (
"context"
"fmt"
"net/http"
+ "os"
"os/user"
"strconv"
"time"
@@ -26,6 +27,8 @@ type WebDavOption struct {
collection *string
tlsPrivateKey *string
tlsCertificate *string
+ cacheDir *string
+ cacheSizeMB *int64
}
func init() {
@@ -35,6 +38,8 @@ func init() {
webDavStandaloneOptions.collection = cmdWebDav.Flag.String("collection", "", "collection to create the files")
webDavStandaloneOptions.tlsPrivateKey = cmdWebDav.Flag.String("key.file", "", "path to the TLS private key file")
webDavStandaloneOptions.tlsCertificate = cmdWebDav.Flag.String("cert.file", "", "path to the TLS certificate file")
+ webDavStandaloneOptions.cacheDir = cmdWebDav.Flag.String("cacheDir", os.TempDir(), "local cache directory for file chunks")
+ webDavStandaloneOptions.cacheSizeMB = cmdWebDav.Flag.Int64("cacheCapacityMB", 1000, "local cache capacity in MB")
}
var cmdWebDav = &Command{
@@ -105,6 +110,8 @@ func (wo *WebDavOption) startWebDav() bool {
Uid: uid,
Gid: gid,
Cipher: cipher,
+ CacheDir: *wo.cacheDir,
+ CacheSizeMB: *wo.cacheSizeMB,
})
if webdavServer_err != nil {
glog.Fatalf("WebDav Server startup error: %v", webdavServer_err)