Merge pull request #623 from blink1073/avoid-large-upload

Avoid trying to upload large files
pull/622/merge
Min RK 11 years ago
commit 59aac8b93e

@ -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 : 'Cannot upload file',
body : "Cannot 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