-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
如何不下载图片,通过mediaId获取图片存储的URL #89
Comments
你存到本地再上传到七牛啊,url又不能直接上传到七牛 |
http://developer.qiniu.com/docs/v6/api/reference/rs/fetch.html,是可以的。 |
@caolixiang 2.x 系列已经不会改了,你最好是直接上传本地文件,上传完后可以删除 |
我也建议加上个查看media地址的方法,七牛的fetch可以直接抓取,不需要在本地绕一圈了,目前自己拼接也不麻烦,Media::API_TEMPORARY_GET +access_token +mediaId 就可以了 |
|
mediaid已经能获取到,其实楼主想要的返回的地址就是素材内容的url:https://api.weixin.qq.com/cgi-bin/media/get?access_token=ACCESS_TOKEN&media_id=MEDIA_ID,而不是直接下载,比如 $media->getDownloadUrl , 这样这个url地址就可以直接给到七牛的fetch接口那里,直接传到七牛空间上去了,目前Media方法里只有download |
大大,我想通过mediaId拿到图片然后存在七牛云上。
看了一下API,文件被file_put_contents了,有木有接口可以直接获取URL。
The text was updated successfully, but these errors were encountered: