微信小程序 图片上传,配置域名?

小程序 文章 2021-03-06 09:01 580 0 全屏看文

AI助手支持GPT4.0

微信小程序 图片上传,配置域名?WeChat Mini Program Image upload, configure domain name?

微信小程序 图片上传,配置域名?

有大神知道这个是为什么吗,上传图片是配置这个域名的吧

Does the God know why this is, upload the picture is to configure this domain name

回答:

青寒:

“为了 access_token 的安全性,后端 API 不能直接在小程序内通过 wx.request 调用,即 api.weixin.qq.com 不能被配置为服务器域名。开发者应在后端服务器使用getAccessToken获取 access_token,并调用相关 API;”


参见:https://developers.weixin.qq.com/miniprogram/dev/framework/server-ability/backend-api.html

文化工业下单向度的憨憨:你是要吧图片传到公众号后台吗……用云函数吧
陕西破折号:

你要把图片传到哪里,要填你自己服务器的域名。

-EOF-

AI助手支持GPT4.0