fnp
/
edumed.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b77d50e
)
validate filename length
author
Jan Szejko
<janek37@gmail.com>
Mon, 16 Jan 2017 12:43:45 +0000
(13:43 +0100)
committer
Jan Szejko
<janek37@gmail.com>
Mon, 16 Jan 2017 12:43:45 +0000
(13:43 +0100)
stage2/static/js/checkfile.js
patch
|
blob
|
history
diff --git
a/stage2/static/js/checkfile.js
b/stage2/static/js/checkfile.js
index
5482688
..
36afefc
100644
(file)
--- a/
stage2/static/js/checkfile.js
+++ b/
stage2/static/js/checkfile.js
@@
-14,6
+14,10
@@
$(function() {
alert('Błędne rozszerzenie! Powinno być: ' + ext);
ok = false;
}
+ if (name.length > 100) {
+ alert('Za długa nazwa pliku! Maksymalna długość: 100 znaków (jest: ' + name.length + ')');
+ ok = false;
+ }
}
var size = this.files[0].size;
if (size > 20 * 1024 * 1024) {