summaryrefslogtreecommitdiff
path: root/program/js
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2012-06-06 17:48:06 +0200
committerThomas Bruederli <thomas@roundcube.net>2012-06-06 17:48:06 +0200
commit9df79d82b3e7b57f3b338d2036e0beb0029798f9 (patch)
tree043dea28d649b4b098e2fb8d7a5444ab8908b560 /program/js
parentae6d2de17f740915e47c64d210680eb5e9850335 (diff)
Better comments
Diffstat (limited to 'program/js')
-rw-r--r--program/js/app.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/program/js/app.js b/program/js/app.js
index b3d3aed5c..c256fa3bd 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -6294,16 +6294,17 @@ function rcube_webmail()
if (!f.size) f.size = f.fileSize;
if (!f.type) f.type = 'application/octet-stream';
- // binary encode file name
+ // file name contains non-ASCII characters, do UTF8-binary string conversion.
if (!formdata && /[^\x20-\x7E]/.test(f.name))
f.name_bin = unescape(encodeURIComponent(f.name));
+ // filter by file type if requested
if (this.env.filedrop.filter && !f.type.match(new RegExp(this.env.filedrop.filter))) {
// TODO: show message to user
continue;
}
- // the easy way with FormData (FF4+, Chrome, Safari)
+ // do it the easy way with FormData (FF 4+, Chrome 5+, Safari 5+)
if (formdata) {
formdata.append(fieldname + '[]', f);
if (i == last)