feat: 添加Docker配置,集成my_oss图片服务

This commit is contained in:
Cuishibing
2026-04-26 20:44:55 +08:00
parent 9263f7f460
commit 0c03f95729
4 changed files with 66 additions and 7 deletions

View File

@@ -2,8 +2,8 @@ import { NextRequest, NextResponse } from 'next/server';
import sharp from 'sharp';
const MAX_SIZE = 5 * 1024 * 1024; // 5MB
const OSS_URL = 'http://localhost:9000';
const API_KEY = '7cf93760ea49b750c96e6078b364e5f0';
const OSS_URL = process.env.OSS_URL || 'http://localhost:9000';
const API_KEY = process.env.OSS_API_KEY || '7cf93760ea49b750c96e6078b364e5f0';
export async function POST(request: NextRequest) {
let imageBuffer: Buffer;