admin: localimporter can make symlink instead of copying whole files
This commit is contained in:
parent
d81f068eba
commit
8ed23ddc7a
5 changed files with 63 additions and 24 deletions
|
@ -10,10 +10,6 @@ import (
|
|||
"github.com/studio-b12/gowebdav"
|
||||
)
|
||||
|
||||
var CloudDAVBase string = "https://srs.epita.fr/owncloud/remote.php/webdav/FIC 2018"
|
||||
var CloudUsername string = "fic"
|
||||
var CloudPassword string = ""
|
||||
|
||||
type CloudImporter struct {
|
||||
baseDAV url.URL
|
||||
username string
|
||||
|
@ -55,6 +51,10 @@ func (i CloudImporter) toURL(filename string) string {
|
|||
return fullURL.String()
|
||||
}
|
||||
|
||||
func (i CloudImporter) importFile(URI string, next func(string, string) (interface{}, error)) (interface{}, error) {
|
||||
return ImportFile(i, URI, next)
|
||||
}
|
||||
|
||||
func (i CloudImporter) getFile(filename string, writer *bufio.Writer) error {
|
||||
fullURL := i.baseDAV
|
||||
fullURL.Path = path.Join(fullURL.Path, filename)
|
||||
|
|
Reference in a new issue