fnp
/
edumed.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
new emails
[edumed.git]
/
stage2
/
static
/
js
/
checkfile.js
diff --git
a/stage2/static/js/checkfile.js
b/stage2/static/js/checkfile.js
index
f15c134
..
5482688
100644
(file)
--- a/
stage2/static/js/checkfile.js
+++ b/
stage2/static/js/checkfile.js
@@
-8,13
+8,16
@@
$(function() {
var ext = this.getAttribute('data-ext');
var re = new RegExp('\\.(' + ext + ')$', 'i');
if (!re.exec(name)) {
var ext = this.getAttribute('data-ext');
var re = new RegExp('\\.(' + ext + ')$', 'i');
if (!re.exec(name)) {
- alert('Błędne rozszerzenie! Powinno być jedno z: ' + ext.replace(/\|/g, ', '));
+ if (/\|/.exec(ext))
+ alert('Błędne rozszerzenie! Powinno być jedno z: ' + ext.replace(/\|/g, ', '));
+ else
+ alert('Błędne rozszerzenie! Powinno być: ' + ext);
ok = false;
}
}
var size = this.files[0].size;
ok = false;
}
}
var size = this.files[0].size;
- if (size >
1
0 * 1024 * 1024) {
- alert('Rozmiar pliku nie może przekraczać
1
0 MB!');
+ if (size >
2
0 * 1024 * 1024) {
+ alert('Rozmiar pliku nie może przekraczać
2
0 MB!');
ok = false;
}
if (!ok) {
ok = false;
}
if (!ok) {