fnp
/
edumed.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add missing translation
[edumed.git]
/
stage2
/
static
/
js
/
checkfile.js
diff --git
a/stage2/static/js/checkfile.js
b/stage2/static/js/checkfile.js
index
36afefc
..
19db762
100644
(file)
--- a/
stage2/static/js/checkfile.js
+++ b/
stage2/static/js/checkfile.js
@@
-14,14
+14,15
@@
$(function() {
alert('Błędne rozszerzenie! Powinno być: ' + ext);
ok = false;
}
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 + ')');
+ if (name.length >
65
) {
+ alert('Za długa nazwa pliku! Maksymalna długość:
65
znaków (jest: ' + name.length + ')');
ok = false;
}
}
ok = false;
}
}
+ var max_size = this.getAttribute('data-max') || 20;
var size = this.files[0].size;
var size = this.files[0].size;
- if (size >
20
* 1024 * 1024) {
- alert('Rozmiar pliku nie może przekraczać
20
MB!');
+ if (size >
max_size
* 1024 * 1024) {
+ alert('Rozmiar pliku nie może przekraczać
' + max_size + '
MB!');
ok = false;
}
if (!ok) {
ok = false;
}
if (!ok) {