There is a problem with WeChat Mini Programs Cloud's development and uploading pictures.

use cloud function to upload pictures to storage, everything is normal, but when you open Cloud Development and Storage Management to browse the details of images, you find that the images cannot be loaded, and the sizes are all 107B. Excuse me, what is the problem?

clipboard.png

Cloud function

exports.main = async(event, context) => {
  let {
    cloudPath,
    fileContent
  } = event
  return await cloud.uploadFile({
    cloudPath,
    fileContent: fileContent[0],
  })
}
Aug.09,2021
Menu