From 699dc9c754b76490091b5f1108a05953f6b8272c Mon Sep 17 00:00:00 2001 From: dumpfmprod Date: Wed, 24 Feb 2010 08:08:31 -0500 Subject: Added filename check --- static/js/pichat.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'static/js') diff --git a/static/js/pichat.js b/static/js/pichat.js index 3137ac4..641662f 100755 --- a/static/js/pichat.js +++ b/static/js/pichat.js @@ -291,8 +291,8 @@ function favoriteImage() {}; function setupUpload(elementId, roomKey) { var onSubmit = function(file, ext) { - if (!(ext && /^(jpg|png|jpeg|gif)$/i.test(ext))) { - alert('Error: invalid file extension ' + ext); + if (!(ext && /^(jpg|png|jpeg|gif|bmp)$/i.test(ext))) { + alert('SORRY, NOT AN IMAGE DUDE... '); return false; } }; -- cgit v1.2.3-70-g09d2