feat: 添加图片代理接口,保护OSS API key
This commit is contained in:
@@ -76,7 +76,7 @@ export async function POST(request: NextRequest) {
|
||||
|
||||
const fileData = await uploadRes.json();
|
||||
|
||||
const url = `${OSS_URL}/api/files/${fileData.fileKey}/preview?key=${API_KEY}`;
|
||||
const url = `/api/files/${fileData.fileKey}`;
|
||||
return NextResponse.json({ url, fileKey: fileData.fileKey });
|
||||
} catch (error) {
|
||||
console.error('Upload error:', error);
|
||||
|
||||
Reference in New Issue
Block a user