Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请教一下, 自定义上传图片时只能通过AddFile()方法传路径参数的形式去上传文件 不能够直接传文件流吗 #171

Closed
xianjieee opened this issue Aug 10, 2023 · 2 comments

Comments

@xianjieee
Copy link

t.Run("", func(t *testing.T) {
p := alipay.NewPayload("ant.merchant.expand.indirect.image.upload")
p.AddFile("image_content", "8466221.png", "8466221.png")
p.AddParam("image_type", "jpg")
p.Verify = false

	client, err := alipay.New(aId, g, true)
	if err != nil {
		log.Fatal("New err:", err)
	}

	var result = make(map[string]interface{})

	err = client.Request(p, &result)
	if err != nil {
		log.Fatal("Request err:", err)
	}

	fmt.Println("result:", result)
})
@smartwalle
Copy link
Owner

目前只支持上传本地文件

@smartwalle
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants