Files
test1/app/api/file/sign/route.ts
2026-03-20 07:33:46 +00:00

13 lines
320 B
TypeScript

import { oapiClient, sendResponse } from '../../oapi-client'
export async function POST(req: Request) {
const body = req.body ? await req.json() : {}
const key = body.file_path || body.key
const res = await oapiClient.post('v1/oss/sign_url', {
key,
params: body.params,
})
return sendResponse(res)
}