From 205a34e25b280fe2cffc2223730fffd2637661bf Mon Sep 17 00:00:00 2001 From: gebele Date: Mon, 21 Sep 2015 12:20:13 +0200 Subject: include batch selection in top frame --- application.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'application.rb') diff --git a/application.rb b/application.rb index 4b36e7b..1e9cf35 100644 --- a/application.rb +++ b/application.rb @@ -202,6 +202,10 @@ post '/predict/?' do # process batch prediction if !params[:fileselect].blank? + if params[:fileselect][:filename] !~ /\.csv$/ + @error_report = "Please submit a csv file." + return haml :error + end File.open('tmp/' + params[:fileselect][:filename], "w") do |f| f.write(params[:fileselect][:tempfile].read) end -- cgit v1.2.3