Avoid trying to upload large files

pull/623/head
Steven Silvester 11 years ago
parent 3c31700fb8
commit 4289699c4e

@ -181,6 +181,16 @@ define([
var name_and_ext = utils.splitext(f.name);
var file_ext = name_and_ext[1];
// skip files over 15MB with a warning
if (f.size > 15728640) {
dialog.modal({
title : 'Failed to upload file',
body : "Failed to upload file (>15MB) '" + f.name + "'",
buttons : {'OK' : { 'class' : 'btn-primary' }}
});
continue;
}
var reader = new FileReader();
if (file_ext === '.ipynb') {
reader.readAsText(f);

Loading…
Cancel
Save