remove some less useful mimes from matcher

pull/111/merge
Ondřej Hruška 7 years ago
parent 44ea1e5b49
commit 07d1a3d3b4
  1. 2
      html_orig/js/app.js
  2. 2
      html_orig/jssrc/term.js

@ -2417,7 +2417,7 @@ var TermUpl = (function() {
var reader = new FileReader(); var reader = new FileReader();
var file = evt.target.files[0]; var file = evt.target.files[0];
console.log("Selected file type: "+file.type); console.log("Selected file type: "+file.type);
if (!file.type.match(/text\/.*|application\/(json|x?html|csv|.*xml.*|.*script.*)|image\/(.*xml.*)/)) { if (!file.type.match(/text\/.*|application\/(json|csv|.*xml.*|.*script.*)/)) {
// Deny load of blobs like img - can crash browser and will get corrupted anyway // Deny load of blobs like img - can crash browser and will get corrupted anyway
if (!confirm("This does not look like a text file: "+file.type+"\nReally load?")) { if (!confirm("This does not look like a text file: "+file.type+"\nReally load?")) {
qs('#fu_file').value = ''; qs('#fu_file').value = '';

@ -811,7 +811,7 @@ var TermUpl = (function() {
var reader = new FileReader(); var reader = new FileReader();
var file = evt.target.files[0]; var file = evt.target.files[0];
console.log("Selected file type: "+file.type); console.log("Selected file type: "+file.type);
if (!file.type.match(/text\/.*|application\/(json|x?html|csv|.*xml.*|.*script.*)|image\/(.*xml.*)/)) { if (!file.type.match(/text\/.*|application\/(json|csv|.*xml.*|.*script.*)/)) {
// Deny load of blobs like img - can crash browser and will get corrupted anyway // Deny load of blobs like img - can crash browser and will get corrupted anyway
if (!confirm("This does not look like a text file: "+file.type+"\nReally load?")) { if (!confirm("This does not look like a text file: "+file.type+"\nReally load?")) {
qs('#fu_file').value = ''; qs('#fu_file').value = '';

Loading…
Cancel
Save