mirror of
https://github.com/mickael-kerjean/filestash
synced 2026-01-05 23:35:34 +01:00
fix (ftp): ftp url scheme
This commit is contained in:
parent
a1df5241a0
commit
6f9dff75d9
1 changed files with 3 additions and 0 deletions
|
|
@ -37,6 +37,9 @@ func (f Ftp) Init(params map[string]string, app *App) (IBackend, error) {
|
|||
if params["hostname"] == "" {
|
||||
params["hostname"] = "localhost"
|
||||
}
|
||||
params["hostname"] = strings.TrimPrefix(params["hostname"], "ftp://")
|
||||
params["hostname"] = strings.TrimPrefix(params["hostname"], "ftps://")
|
||||
|
||||
if params["port"] == "" {
|
||||
params["port"] = "21"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue