From 4e48166bc628174c8c087d5eadefdad532f5805d Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Wed, 5 Jul 2017 11:39:15 +0800 Subject: [PATCH] small fix for uploader --- app/views/admin/hps_learnings/_file_uploader.html.erb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/views/admin/hps_learnings/_file_uploader.html.erb b/app/views/admin/hps_learnings/_file_uploader.html.erb index 9cb74a7..3792c8b 100644 --- a/app/views/admin/hps_learnings/_file_uploader.html.erb +++ b/app/views/admin/hps_learnings/_file_uploader.html.erb @@ -72,11 +72,10 @@ autoUpload : false, url : "/admin/hps_learnings/upload_temp_file", maxChunkSize : 8 * 1024 * 1024, - acceptFileTypes: /(\.|\/)(zip|ZIP)$/i, + acceptFileTypes: /(\.|\/)(zip)$/i, add : function(e, data){ uploadBtn.removeClass("hide"); notificationArea.removeClass("error").text(data.files[0].name); - return false; var uploadData = data; uploadBtn.one("click",function(){ $.ajax({ @@ -157,7 +156,7 @@ $("#presentation-file").on("change",function(){ var file = $(this)[0].files[0].name.split("."); - if(file[file.length - 1] == "zip" || file[file.length - 1] == "ZIP"){ + if(file[file.length - 1] == "zip"){ return true; }else{ uploadBtn.addClass("hide");