|
|
@ -127,6 +127,9 @@ func ReceiveHandler(w http.ResponseWriter, r *http.Request) { |
|
|
default: |
|
|
default: |
|
|
http.Error(w, "Method not allowed", http.StatusMethodNotAllowed) |
|
|
http.Error(w, "Method not allowed", http.StatusMethodNotAllowed) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 输出接收结果
|
|
|
|
|
|
fmt.Fprintf(w, "接收成功,并已经完成解压缩") |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 文件服务
|
|
|
// 文件服务
|
|
|
@ -213,7 +216,8 @@ func SendZip(w http.ResponseWriter, r *http.Request) { |
|
|
fmt.Printf("Send file to %s error: %s\n", remoteAddr, err) |
|
|
fmt.Printf("Send file to %s error: %s\n", remoteAddr, err) |
|
|
} |
|
|
} |
|
|
}() |
|
|
}() |
|
|
|
|
|
// 页面上显示
|
|
|
|
|
|
fmt.Fprintf(w, "File:%s,been sent successfully.", zpFileName) |
|
|
} else { |
|
|
} else { |
|
|
fmt.Println("archive is not exist!!!") |
|
|
fmt.Println("archive is not exist!!!") |
|
|
} |
|
|
} |
|
|
|