0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-27 18:02:42 +00:00

aah, i forgot to add the latest commit

This commit is contained in:
Víctor Losada Hernández
2025-08-21 16:53:36 +02:00
parent 320f1e120f
commit dd46a059c5

View File

@@ -34,16 +34,11 @@ const NewBrew = ()=>{
}
const type = file.name.split('.').pop().toLowerCase();
if(type === 'txt') {
alert(
`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) {
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`);
}
alert(`This file is invalid: ${!type ? "Missing file extension" :`.${type} files are not supported`}. Only .txt files exported from the Homebrewery are allowed.`);
console.log(file);
};
reader.readAsText(file);
};