jdsh2
This commit is contained in:
@@ -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)])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user