fix(mobile): handle file picker cancellation

This commit is contained in:
key
2026-07-29 02:01:45 +08:00
parent fd59421574
commit cb928edafd
18 changed files with 202 additions and 26 deletions
+2 -1
View File
@@ -8,6 +8,7 @@ import type {
CaseUploadResponse
} from '@/types/api';
import { apiRequest, apiUrl, authHeaders, authenticatedFileUrl, readTextPayload } from './api';
import { fileSelectionFailure } from '../utils/file-selection';
const audioExtensions = ['.mp3', '.wav', '.m4a', '.webm', '.aac', '.ogg'];
@@ -31,7 +32,7 @@ export const chooseCaseAudio = () =>
size: Number(file.size || 0)
});
},
fail: () => reject(new Error('未选择音频'))
fail: (error) => reject(fileSelectionFailure(error, '音频'))
});
});