kopia lustrzana https://github.com/backface/turtlestitch
give error message when attempting to import (into a variable) with a non-text file; don't read every file in multifile import
rodzic
ce3340e623
commit
442265ba5f
10
objects.js
10
objects.js
|
@ -6466,11 +6466,11 @@ WatcherMorph.prototype.userMenu = function () {
|
||||||
document.body.removeChild(inp);
|
document.body.removeChild(inp);
|
||||||
ide.filePicker = null;
|
ide.filePicker = null;
|
||||||
if (inp.files.length > 0) {
|
if (inp.files.length > 0) {
|
||||||
for (i = 0; i < inp.files.length; i += 1) {
|
file = inp.files[inp.files.length - 1];
|
||||||
file = inp.files[i];
|
if (file.type.indexOf("text") === 0) {
|
||||||
if (file.type.indexOf("text") === 0) {
|
readText(file);
|
||||||
readText(file);
|
} else {
|
||||||
}
|
ide.inform("Unable to import", "Snap! can only import \"text\" files.\n You selected a file of type \"" + file.type + "\".");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Ładowanie…
Reference in New Issue