fix #22 (backend,frontend): the backend and frontend had whitelists that only included audio formats

This commit was merged in pull request #36.
This commit is contained in:
2026-09-02 20:12:00 +05:00
parent 1b0767af90
commit cf0b9f62cb
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -14,7 +14,8 @@ router = APIRouter(prefix="/api", tags=["upload"])
ALLOWED_EXTENSIONS = {
".mp3", ".flac", ".wav", ".m4a", ".ogg", ".opus",
".aac", ".wma", ".aiff", ".alac", ".ac3"
".aac", ".wma", ".aiff", ".alac", ".ac3",
".mp4", ".mkv", ".webm",
}
+2 -2
View File
@@ -7,7 +7,7 @@ import { useOptionsStore } from '../stores/optionsStore' // NEW
import { uploadFile, getTaskInfo, getRecommendedFormat } from '../api/client' // NEW
import { useTaskStore } from '../stores/taskStore'
const ALLOWED_EXTENSIONS = ['.mp3', '.flac', '.wav', '.m4a', '.ogg', '.opus', '.aac', '.wma', '.aiff', '.alac', '.ac3']
const ALLOWED_EXTENSIONS = ['.mp3', '.flac', '.wav', '.m4a', '.ogg', '.opus', '.aac', '.wma', '.aiff', '.alac', '.ac3', '.mp4', '.mkv', '.webm']
export const UploadZone: React.FC = () => {
const {
@@ -96,7 +96,7 @@ export const UploadZone: React.FC = () => {
const { getRootProps, getInputProps, isDragActive } = useDropzone({
onDrop,
accept: {
'audio/*': ALLOWED_EXTENSIONS,
'media/*': ALLOWED_EXTENSIONS
},
multiple: false,
disabled: isUploading,