Solution to unresponsive file upload in WeChat applet

Solution to WeChat applet file upload failure

1. Phenomenon

I updated the mini program today and found that I couldn't start taking photos or selecting photos for file upload. When I clicked the upload button, there was no response or any error. I was immediately confused. Finally, I had an idea and remembered that WeChat recently updated its privacy agreement, which is required for file uploads.

wx.chooseImage、wx.chooseMedia、wx.chooseVideo
wx.authorize({scope: ‘scope.camera’})、wx.createVKSession、

These interfaces need to be declared in the privacy agreement before they can be used. Finally, I added these two permissions in the privacy agreement, and the file can be uploaded again.

How to create a privacy agreement pop-up window, please refer to the previous blog

WeChat mini program new privacy agreement pop-up window implements the latest version

2. Solution

  1. Log in to the WeChat open platform and enter the mini program backend

  2. Select version management, select the latest version, and submit for review

  3. Enter the review page and scroll to the bottom to "Update Privacy Agreement"

  4. On the privacy agreement page, **[Add information type]** adds permissions for camera, selected photo or video information. Update user privacy agreement
    Insert image description here

  5. Republish mini program

Guess you like

Origin blog.csdn.net/qq_35921773/article/details/132987238