diff options
author | gebele <gebele@in-silico.ch> | 2015-09-21 12:20:13 +0200 |
---|---|---|
committer | gebele <gebele@in-silico.ch> | 2015-09-21 12:20:13 +0200 |
commit | 205a34e25b280fe2cffc2223730fffd2637661bf (patch) | |
tree | 1330f759364d4cfd17c0bc4ed16394e1ee486238 /application.rb | |
parent | 020cdb5c7974815a7ebe7cf976f026010acd6ef2 (diff) |
include batch selection in top frame
Diffstat (limited to 'application.rb')
-rw-r--r-- | application.rb | 4 |
1 files changed, 4 insertions, 0 deletions
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 |