This commit is contained in:
张成
2025-11-24 13:23:42 +08:00
commit 5d7444cd65
156 changed files with 50653 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
const Framework = require("../../framework/node-core-framework.js");
const ossToolService = require('../services/oss_tool_service.js');
module.exports = {
'POST /file/upload_oss': async (ctx) => {
const body = ctx.getBody();
const { fileBase64 } = body;
// base 64 转buffer
const buffer = Buffer.from(fileBase64, 'base64');
let result = await ossToolService.uploadStream(buffer, 'image/jpeg', 'jpg')
return ctx.success(result);
}
}