ASR/cloudfunctions/getTempFileURL/index.js

15 lines
302 B
JavaScript
Raw Normal View History

2020-08-31 16:55:41 +00:00
// 云函数入口文件
const cloud = require('wx-server-sdk')
// 云函数入口函数
exports.main = async (event) => {
cloud.init({
env: process.env.TCB_ENV,
})
const fileList = event.fileIdList
const result = await cloud.getTempFileURL({
fileList,
})
return result.fileList
}