mirror of
https://github.com/dataelement/bisheng.git
synced 2026-09-01 15:32:50 +08:00
fix(knowledge): drop duplicate MEDIA_FILE_EXTENSIONS from the merge
The feat/2.6.0 merge brought in its own MEDIA_FILE_EXTENSIONS while 146c7c5ab had added an equivalent one lower in the file; git took both, so esbuild failed with 'Multiple exports with the same name'. Keep the original position (ALLOWED_EXTENSIONS uses it above) and move AUDIO_/VIDEO_FILE_EXTENSIONS up beside it.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -66,9 +66,11 @@ export function isKnowledgeItemPending(file: KnowledgeFile): boolean {
|
||||
}
|
||||
|
||||
// ─── File upload constants ──────────────────────────────────────────
|
||||
export const AUDIO_FILE_EXTENSIONS = ["mp3", "wav", "m4a", "aac", "flac", "ogg"] as const;
|
||||
export const VIDEO_FILE_EXTENSIONS = ["mp4", "mov", "avi", "mkv", "webm"] as const;
|
||||
export const MEDIA_FILE_EXTENSIONS = [
|
||||
"mp3", "wav", "m4a", "aac", "flac", "ogg",
|
||||
"mp4", "mov", "avi", "mkv", "webm",
|
||||
...AUDIO_FILE_EXTENSIONS,
|
||||
...VIDEO_FILE_EXTENSIONS,
|
||||
] as const;
|
||||
|
||||
/**
|
||||
@@ -166,13 +168,6 @@ export const DEFAULT_MAX_FILE_SIZE_MB = 50;
|
||||
/** Default maximum media file size in MB when env config is not available */
|
||||
export const DEFAULT_MEDIA_MAX_FILE_SIZE_MB = 1024;
|
||||
|
||||
export const AUDIO_FILE_EXTENSIONS = ["mp3", "wav", "m4a", "aac", "flac", "ogg"] as const;
|
||||
export const VIDEO_FILE_EXTENSIONS = ["mp4", "mov", "avi", "mkv", "webm"] as const;
|
||||
export const MEDIA_FILE_EXTENSIONS = [
|
||||
...AUDIO_FILE_EXTENSIONS,
|
||||
...VIDEO_FILE_EXTENSIONS,
|
||||
] as const;
|
||||
|
||||
export interface UploadSizeLimits {
|
||||
defaultMaxMB: number;
|
||||
mediaMaxMB: number;
|
||||
|
||||
Reference in New Issue
Block a user