mirror of
https://github.com/Yanyutin753/ChatGPT-Next-Web-LangChain-Gpt-4-All.git
synced 2025-10-13 14:35:00 +00:00
修改上传文件mime
This commit is contained in:
@@ -3,8 +3,13 @@ import LocalFileStorage from "@/app/utils/local_file_storage";
|
||||
import S3FileStorage from "@/app/utils/s3_file_storage";
|
||||
import { NextRequest, NextResponse } from "next/server";
|
||||
|
||||
|
||||
interface MimeTypeMap {
|
||||
[extension: string]: string;
|
||||
}
|
||||
|
||||
// 创建一个文件扩展名到MIME类型的映射
|
||||
const mimeTypeMap = {
|
||||
const mimeTypeMap: MimeTypeMap = {
|
||||
'png': 'image/png',
|
||||
'jpg': 'image/jpeg',
|
||||
'webp': 'image/webp',
|
||||
@@ -121,4 +126,3 @@ export const GET = handle;
|
||||
|
||||
export const runtime = "nodejs";
|
||||
export const revalidate = 0;
|
||||
|
||||
|
Reference in New Issue
Block a user