Improve compatibility and add one-click startup scripts
- Add Windows Portable Package support with auto-detection - Fix API health check to support multiple response formats - Fix task ID parsing for ACE-Step API integration - Change thinking mode default to false for 4GB GPU compatibility - Add explicit CoT parameter control for LLM features - Fix audio download path encoding for portable package - Improve file upload validation with extension fallback - Add start-all.bat/sh scripts for one-click startup - Update README with Windows Portable Package instructions - Add comprehensive troubleshooting section - Improve cross-platform compatibility
This commit is contained in:
@@ -26,6 +26,9 @@ const audioUpload = multer({
|
||||
fileFilter: (_req, file, cb) => {
|
||||
const allowedTypes = [
|
||||
'audio/mpeg',
|
||||
'audio/mp3', // Alternative MIME type for MP3
|
||||
'audio/mpeg3',
|
||||
'audio/x-mpeg-3',
|
||||
'audio/wav',
|
||||
'audio/x-wav',
|
||||
'audio/flac',
|
||||
@@ -35,10 +38,15 @@ const audioUpload = multer({
|
||||
'audio/ogg',
|
||||
'audio/webm',
|
||||
];
|
||||
if (allowedTypes.includes(file.mimetype)) {
|
||||
|
||||
// Also check file extension as fallback
|
||||
const allowedExtensions = ['.mp3', '.wav', '.flac', '.m4a', '.aac', '.ogg', '.webm', '.opus'];
|
||||
const fileExt = file.originalname.toLowerCase().match(/\.[^.]+$/)?.[0];
|
||||
|
||||
if (allowedTypes.includes(file.mimetype) || (fileExt && allowedExtensions.includes(fileExt))) {
|
||||
cb(null, true);
|
||||
} else {
|
||||
cb(new Error('Invalid file type. Only common audio formats are allowed.'));
|
||||
cb(new Error(`Invalid file type. Only common audio formats are allowed. Received: ${file.mimetype} (${file.originalname})`));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user