WeChat Mini Programs failed to upload pictures


WeChat Mini Programs uploads a picture and reports this error. Is it a problem with the interface

?

here is the code

  chooseImage: function() {
    wx.chooseImage({
      count: 1, // 9
      sizeType: ["compressed"], // 
      sourceType: ["album", "camera"], // 
      success: function (res) {
        // tempFilePathimgsrc
        var tempFilePaths = res.tempFilePaths
        console.log(tempFilePaths)
        wx.uploadFile({
          url: "https://wxapi.ygjsw.org/index.php/api/v1/upload_img", //
          filePath: tempFilePaths[0],
          name: "file",
          formData: {
            "user": "test"
          },
          success: function (res) {
            var data = res.data
            //do something
            console.log(res)
          },
          fail: function(err) {
            console.log(err)
          }
        })
      }
    })
  }
Mar.28,2021

sometimes it is a problem with the simulator. Try publishing it online, maybe it will be OK

there have been people who have encountered problems like thinking


have you tried it on your phone?

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e45ca0-59baf.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e45ca0-59baf.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?