This commit is contained in:
苏尹岚
2020-11-19 10:16:38 +08:00
parent ff94749ce6
commit 4551594f91
2 changed files with 88 additions and 0 deletions

View File

@@ -6,6 +6,7 @@ import (
"crypto/cipher"
"encoding/base64"
"fmt"
"strings"
"testing"
"git.rosy.net.cn/baseapi/utils"
@@ -181,3 +182,15 @@ func TestUpdateExpand(t *testing.T) {
}
// t.Log(utils.Format4Output(result, false))
}
func TestUploadImageNew(t *testing.T) {
// data, _, err := DownloadFileByURL("http://image.jxc4.com/image/b90ae8585e8cf2f3871f6e8318bde1dc.tem.png")
// result, err := api.UploadImageNew(data, "b90ae8585e8cf2f3871f6e8318bde1dc.tem.png")
// if err != nil {
// t.Fatal(err)
// }
// t.Log(utils.Format4Output(result, false))
str := "http://image.jxc4.com/image/b90ae8585e8cf2f3871f6e8318bde1dc.tem.png"
fmt.Println(str[strings.LastIndex(str, "/")+1 : len(str)])
}