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ag,connection:keep-alive,content-length:4053,content-type:multipart/form-data; boundary=--------------------------204553655389695640482081,host:cloud.cross2pay.com,referer:https://servicewechat.com/wx7ef89f8228de2224/devtools/page-frame.html,user-agent:Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1 wechatdevtools/1.06.2212011 MicroMessenger/8.0.5 Language/zh_CN webview/,x-client-proto:https,x-client-proto-ver:HTTP/1.1,x-forwarded-for:114.254.2.56, 111.202.117.152,x-forwarded-proto:https,x-nws-log-uuid:18395510009296570843,x-origin-host:cloud.cross2pay.com,x-real-ip:111.202.117.152,x-stgw-time:1672730685.640,x-tencent-ua:Qcloud},httpMethod:POST,isBase64Encoded:true,multiValueHeaders:{06d7542462b90dfe207b7746150b6b9c:[tag],connection:[keep-alive],content-length:[4053],content-type:[multipart/form-data; boundary=--------------------------204553655389695640482081],host:[cloud.cross2pay.com],referer:[https://servicewechat.com/wx7ef89f8228de2224/devtools/page-frame.html],user-agent:[Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1 wechatdevtools/1.06.2212011 MicroMessenger/8.0.5 Language/zh_CN webview/],x-client-proto:[https],x-client-proto-ver:[HTTP/1.1],x-forwarded-for:[114.254.2.56, 111.202.117.152],x-forwarded-proto:[https],x-nws-log-uuid:[18395510009296570843],x-origin-host:[cloud.cross2pay.com],x-real-ip:[111.202.117.152],x-stgw-time:[1672730685.640],x-tencent-ua:[Qcloud]},path:/upload,queryStringParameters:{},requestContext:{appId:1305413971,envId:cross2pay-0gbijhfn93e28715,requestId:e2a69c5b227f715867488a0c282f50b0,uin:100018362999}}
1、云函数中收到的event内容如下:
{body:LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLTIwNDU1MzY1NTM4OTY5NTY0MDQ4MjA4MQ0KQ29udGVudC1E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gbyr/icctgIMIHCfgIRzz/wLsyKF84YfDz3UatXm27s1gxqZtFmIQK6AeuDacJCUUVWie1AYRrXh0qgLh3TzY/MxgILH2K7VwiEz4rHOgJY4gVTljAJxF2YfBJ8jQsBJlBcsHEkiQATSCLB17gQYALFBRtHkggwgSQSfI0LASZQXLBxJIkAE0giwde4EAiVQNi2oyr3kj2Rk7o6wVAVayfhQiVQZX2V8V1QlQKX1ZWrBLsrwqjWFeYbwDBMCZVAAGDzuYKY9cd3RytCBipmIT0MgLqizrEE2AHDMCVUAqHiy05+2C45ahvr6Z2jy8LEKJS8UWfUvS0ByYBd2NIh7/n818IsBN6g7RW7jdPsW3987fClE8ZHas/XV4ZZxFDyhqEYPjiM3alZrb5wBP/f7n+bcBB52BLo98JiVRZfJR4svk6MTYL45jreMtWDymOlHdX7OHwqOyXTwAVbdYBLdQDbdVTxCnU1vnUhAUx1pf97mVrnq/NvvEDnxecO8K+jhD4G0hEULpM6Akwgdaw4pA0CTCAbUNhLHQEmkDpWHNIGASaQDSjspY4AE0gdKw5pgwATyAYU9lJHgAmkjhWHtEGACWQDCnupI8AEUseKQ9ogwASyAYW91BFgAqljxSFtEGAC2YDCXuoIMIHUseKQNggwgWxAYS91BJhA6lhxSBsEmEA2oLCXOgJMIHWsOKQNAkwgG1DYSx0BJpA6VhzSBgEmkA0o7KWOABNIHSsOaYMAE8gGFPZSR4AJpI4Vh7RBgAlkAwp7qSPABFLHikPaIMAEsgGFvdQRYAKpY8UhbRBgAtmAwl7qCDCB1LHikDYIMIFsQGEvdQSYQOpYcUgbBP4PYoEyR1Td5d0AAAAASUVORK5CYIINCi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0yMDQ1NTM2NTUzODk2OTU2NDA0ODIwODEtLQ0K,headers:{06d7542462b90dfe207b7746150b6b9c:tag,connection:keep-alive,content-length:4053,content-type:multipart/form-data; boundary=--------------------------204553655389695640482081,host:cloud.cross2pay.com,referer:https://servicewechat.com/wx7ef89f8228de2224/devtools/page-frame.html,user-agent:Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1 wechatdevtools/1.06.2212011 MicroMessenger/8.0.5 Language/zh_CN webview/,x-client-proto:https,x-client-proto-ver:HTTP/1.1,x-forwarded-for:114.254.2.56, 111.202.117.152,x-forwarded-proto:https,x-nws-log-uuid:18395510009296570843,x-origin-host:cloud.cross2pay.com,x-real-ip:111.202.117.152,x-stgw-time:1672730685.640,x-tencent-ua:Qcloud},httpMethod:POST,isBase64Encoded:true,multiValueHeaders:{06d7542462b90dfe207b7746150b6b9c:[tag],connection:[keep-alive],content-length:[4053],content-type:[multipart/form-data; boundary=--------------------------204553655389695640482081],host:[cloud.cross2pay.com],referer:[https://servicewechat.com/wx7ef89f8228de2224/devtools/page-frame.html],user-agent:[Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1 wechatdevtools/1.06.2212011 MicroMessenger/8.0.5 Language/zh_CN webview/],x-client-proto:[https],x-client-proto-ver:[HTTP/1.1],x-forwarded-for:[114.254.2.56, 111.202.117.152],x-forwarded-proto:[https],x-nws-log-uuid:[18395510009296570843],x-origin-host:[cloud.cross2pay.com],x-real-ip:[111.202.117.152],x-stgw-time:[1672730685.640],x-tencent-ua:[Qcloud]},path:/upload,queryStringParameters:{},requestContext:{appId:1305413971,envId:cross2pay-0gbijhfn93e28715,requestId:e2a69c5b227f715867488a0c282f50b0,uin:100018362999}}
在云函数中,`event.body` 是小程序端传来的请求的正文内容。
当小程序使用 `wx.uploadFile` 上传文件到云函数时,它会将文件内容作为请求正文发送到云函数。根据你的描述,这些内容看起来像是 base64 编码的字符串。
要从 `event.body` 中获取并解析文件内容,你可以使用 Node.js 的 `Buffer` 和 `base64` 模块。例如,你可以这样解码 base64 字符串并将其保存为文件:
const base64 = require('base64'); const fs = require('fs'); exports.main = (event, context) => { const fileContent = base64.decode(event.body); fs.writeFileSync('/tmp/file.txt', fileContent); };
之后你就可以将文件上传到云存储了。
希望这些信息能帮到你!如果你有更多问题,欢迎来讨论。