|
|
|
@ -14,7 +14,6 @@ import (
|
|
|
|
|
*/
|
|
|
|
|
func showPreview(input string){
|
|
|
|
|
uEnc := base64.URLEncoding.EncodeToString([]byte(input))
|
|
|
|
|
fmt.Println(uEnc)
|
|
|
|
|
//生成预览OFFICE的服务地址
|
|
|
|
|
url := "http://10.10.24.100:9000/support/preview/previewOffice"
|
|
|
|
|
resp, _ := http.Get(url+"?p="+uEnc)
|
|
|
|
@ -28,7 +27,7 @@ func main() {
|
|
|
|
|
// 如果要用在url中,需要使用URLEncoding
|
|
|
|
|
//input:="C:\\Users\\Administrator\\Desktop\\技术讨论会\\20A4782A-512C-40ED-8AF9-FCFC7CD29E5B.docx"
|
|
|
|
|
//showPreview(input)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//(2)传入http参数
|
|
|
|
|
//input="https://dsideal.obs.cn-north-1.myhuaweicloud.com/Material/02/0200C9BE-07C6-4EFC-A945-8554C7D41790.doc"
|
|
|
|
|
//showPreview(input)
|
|
|
|
|