I'm using react-dropzone for file uploads. Currently the only file type I'm accepting is .stl files, but when I click on the file upload box, the file explorer still shows Internet Shortcut files.
const { getRootProps, getInputProps, open } = useDropzone({
accept: {
"model/stl": [".stl"],
},
noClick: true,
noKeyboard: true,
maxFiles: 1,
onDrop: (acceptedFiles) => {
const file = acceptedFiles[0];
const extension = file.name.split('.').pop();
if (extension !== 'stl') {
console.error('Invalid file type');
return;
}
updateFile(file);
addFileToScene(file);
},
});
I'm handling the case where an internet shortcut file is selected, but ideally these files won't even show up as an option to the user. Is there a way to hide these type of files so the user can't select them?