mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-10 07:02:39 +00:00
aah, i forgot to add the latest commit
This commit is contained in:
@@ -34,16 +34,11 @@ const NewBrew = ()=>{
|
|||||||
}
|
}
|
||||||
|
|
||||||
const type = file.name.split('.').pop().toLowerCase();
|
const type = file.name.split('.').pop().toLowerCase();
|
||||||
if(type === 'txt') {
|
|
||||||
alert(
|
alert(`This file is invalid: ${!type ? "Missing file extension" :`.${type} files are not supported`}. Only .txt files exported from the Homebrewery are allowed.`);
|
||||||
`This file type is correct, but it is not from the homebrewery or has been tampered with, please try with a correct file or report this as an issue if you think it is a mistake.`
|
|
||||||
);
|
|
||||||
} else if(!type) {
|
console.log(file);
|
||||||
alert('This file is invalid, please, enter a valid file');
|
|
||||||
console.log(file);
|
|
||||||
} else {
|
|
||||||
alert(`This is a .${type} file, only .txt files are allowed`);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
reader.readAsText(file);
|
reader.readAsText(file);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user