腾讯云上传图片

GitHub 高博文
文章标签: 图片上传

腾讯云上传图片

今天做微信小程序上传失败,文件大,主要是图片的文件太大,最后在网上找到了一个解决微信小程序文件太大的问题。

链接:https://www.2cto.com/kf/201804/741170.html

通过腾讯云的cos对象存储,要实名认证

1创建一个存储桶,

image.png

2.创建文件

image.png

访问权限要设置为公有读私有写

3.上传文件

image.png

4.上传你所需要的的文件(图片)

image.png

5.进入你上传的存储桶中查看图片

image.png

6.点击详情查看链接

image.png

7.在项目中更换图片地址,注意tabBar中的图片地址不能使用链接

还能输出{{restrictNumber}}个字符  
  • {{reply.author}}

    {{CommonUtil.formateDate(reply.ac_CommentDate).shortTime}}
  • 回复了{{Comments.author}} :