Browse Source

修正压缩包传送的结构体

master
xyiege 3 months ago
parent
commit
80f139cd01
  1. 10
      scagent/core/FileRpc.go

10
scagent/core/FileRpc.go

@ -33,9 +33,11 @@ type FileChunk struct {
// 压缩文件
type ZipBlock struct {
Basepath string
Curpath string // 当前路径
SelFile []string // 选中的文件
Basepath string
Curpath string // 当前路径
SelFile []string // 选中的文件
RemoteIp string // 远程主机地址,带端口
RemotePath string // 远程主机的存储路径
}
// 处理文件上传
@ -136,7 +138,7 @@ func (f *FileService) Compress(args *ZipBlock, reply *string) error {
// 返回压缩包名称
*reply = ziprl
// 发送文件到远程服务器上
err := clientUploadFile(args.remote, ziprl, "/www/wwwroot")
err := clientUploadFile(args.RemoteIp, ziprl, args.RemotePath)
if err != nil {
logger.Error("Compress", zap.String("msg", "上传文件到远程服务器失败"), zap.Error(err))
return err

Loading…
Cancel
Save