You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DialWithDialer timed out
I can login and create new folder on my server but i can't upload files.
client, err:=ftp.Dial("123.199.198.70:21",
ftp.DialWithTimeout(60*time.Second),
ftp.DialWithExplicitTLS(&tls.Config{
InsecureSkipVerify: true,
ServerName: "123.199.198.70:21"}),
ftp.DialWithDebugOutput(os.Stdout),
)
iferr!=nil {
log.Fatal(err)
}
err=client.Login("root", "123Abc")
iferr!=nil {
log.Fatal(err)
}
// Do something with the FTP conndeferclient.Quit()
remoteDirPath:=filepath.Dir(remotePath)
file, err:=os.Open(localPath)
iferr!=nil {
returnerr
}
deferfile.Close()
// Change to the target directory on the FTP servererr=client.ChangeDir(remoteDirPath)
iferr!=nil {
log.Fatal(err)
}
// Upload the local file to the FTP servererr=client.Stor(remotePath, file)
iferr!=nil {
log.Fatal(err)
}
fmt.Println("File uploaded successfully.")
returnnil
DialWithDialer timed out
I can login and create new folder on my server but i can't upload files.
Message Error
The text was updated successfully, but these errors were encountered: