Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check file type on upload #19

Open
brizental opened this issue Jan 9, 2018 · 1 comment
Open

Check file type on upload #19

brizental opened this issue Jan 9, 2018 · 1 comment
Labels

Comments

@brizental
Copy link
Contributor

brizental commented Jan 9, 2018

Right we have no validation of filetype whatsoever. If the user tries to input a non-image file, the interface crashes.

@brizental brizental added the bug label Jan 9, 2018
@felquis
Copy link

felquis commented Apr 12, 2018

For this one, you need to add the accept attribute to the <input type="file" here

var input = document.createElement("input");
input.type = "file";
c.toolbarArea.appendChild(input);
helpers.fakeInput(input, fakeInput);
helpers.dragDropInput(input, c.displayArea, filenameArea, this);

Check this doc https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file the Limiting accepted file types section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants