add new error message for upload .wav file
This commit is contained in:
@@ -302,17 +302,7 @@ export default function UploadSectionFile({
|
||||
|
||||
} catch (error) {
|
||||
if (!isCancelledRef.current.get(fileId)) {
|
||||
const errorMessage = (() => {
|
||||
switch (error) {
|
||||
case 'duplicate-file':
|
||||
return t('error-duplicate-file');
|
||||
case 'user-not-have-tokens-for-protect':
|
||||
return t('error-user-not-have-tokens-for-protect');
|
||||
default:
|
||||
return t('error-uploading-file');
|
||||
}
|
||||
})();
|
||||
|
||||
const errorMessage = (typeof error === 'string') ? t(error) : t('error-uploading-file');
|
||||
setSelectedFiles(prev => prev.map(f =>
|
||||
f.name === fileInfo.name ? { ...f, status: 'error', error: errorMessage } : f
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user