Hi Konstantin Khomoutov:
Thanks so much for your great support. It works.
BR Robert
2017-02-07 18:24 GMT+08:00 Konstantin Khomoutov <
flatw...@users.sourceforge.net>:
> On Tue, 7 Feb 2017 02:01:51 -0800 (PST)
> Robert Hsiung wrote:
>
> > I tried to upload file via SFTP,but the file size
HI Jesse McNelis:
It works. Thanks so much for your great support.
BR Robert
2017-02-07 18:12 GMT+08:00 Jesse McNelis :
> On Tue, Feb 7, 2017 at 9:01 PM, Robert Hsiung wrote:
> > Hi all:
> > I tried to upload file via SFTP,but the file size is zero when it is
> > done.Any suggestions? T
On Tue, 7 Feb 2017 02:01:51 -0800 (PST)
Robert Hsiung wrote:
> I tried to upload file via SFTP,but the file size is zero when it
> is done.Any suggestions? Thanks so much.
[...]
> srcFile, err := os.Open("F:/NCA/20161027-1.csv")
[...]
> dstFile, err := server.Create("/root/20161027-
On Tue, Feb 7, 2017 at 9:01 PM, Robert Hsiung wrote:
> Hi all:
> I tried to upload file via SFTP,but the file size is zero when it is
> done.Any suggestions? Thanks so much.
> // Copy the file
>
> dstFile.WriteTo(srcFile)
>
> }
>
You're writing the empty destination file to the srcFil
Hi all:
I tried to upload file via SFTP,but the file size is zero when it is
done.Any suggestions? Thanks so much.
//sftp upload
package main
import (
"fmt"
"os"
"github.com/pkg/sftp"
"golang.org/x/crypto/ssh"
)
func main() {
c := &ssh.ClientConfig{
U