|
@ -13,7 +13,7 @@ import ( |
|
|
"github.com/seaweedfs/seaweedfs/weed/pb" |
|
|
"github.com/seaweedfs/seaweedfs/weed/pb" |
|
|
"github.com/seaweedfs/seaweedfs/weed/pb/filer_pb" |
|
|
"github.com/seaweedfs/seaweedfs/weed/pb/filer_pb" |
|
|
"github.com/seaweedfs/seaweedfs/weed/security" |
|
|
"github.com/seaweedfs/seaweedfs/weed/security" |
|
|
"github.com/seaweedfs/seaweedfs/weed/server" |
|
|
|
|
|
|
|
|
weed_server "github.com/seaweedfs/seaweedfs/weed/server" |
|
|
"github.com/seaweedfs/seaweedfs/weed/util" |
|
|
"github.com/seaweedfs/seaweedfs/weed/util" |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
@ -23,6 +23,7 @@ var ( |
|
|
|
|
|
|
|
|
type WebDavOption struct { |
|
|
type WebDavOption struct { |
|
|
filer *string |
|
|
filer *string |
|
|
|
|
|
filerRootPath *string |
|
|
port *int |
|
|
port *int |
|
|
collection *string |
|
|
collection *string |
|
|
replication *string |
|
|
replication *string |
|
@ -44,6 +45,7 @@ func init() { |
|
|
webDavStandaloneOptions.tlsCertificate = cmdWebDav.Flag.String("cert.file", "", "path to the TLS certificate 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.cacheDir = cmdWebDav.Flag.String("cacheDir", os.TempDir(), "local cache directory for file chunks") |
|
|
webDavStandaloneOptions.cacheSizeMB = cmdWebDav.Flag.Int64("cacheCapacityMB", 0, "local cache capacity in MB") |
|
|
webDavStandaloneOptions.cacheSizeMB = cmdWebDav.Flag.Int64("cacheCapacityMB", 0, "local cache capacity in MB") |
|
|
|
|
|
webDavStandaloneOptions.filerRootPath = cmdWebDav.Flag.String("filer.path", "/", "use this remote path from filer server") |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
var cmdWebDav = &Command{ |
|
|
var cmdWebDav = &Command{ |
|
@ -104,6 +106,7 @@ func (wo *WebDavOption) startWebDav() bool { |
|
|
|
|
|
|
|
|
ws, webdavServer_err := weed_server.NewWebDavServer(&weed_server.WebDavOption{ |
|
|
ws, webdavServer_err := weed_server.NewWebDavServer(&weed_server.WebDavOption{ |
|
|
Filer: filerAddress, |
|
|
Filer: filerAddress, |
|
|
|
|
|
FilerRootPath: *wo.filerRootPath, |
|
|
GrpcDialOption: grpcDialOption, |
|
|
GrpcDialOption: grpcDialOption, |
|
|
Collection: *wo.collection, |
|
|
Collection: *wo.collection, |
|
|
Replication: *wo.replication, |
|
|
Replication: *wo.replication, |
|
|