From b8d1c67894585729573e4e7270141f36924d0ac7 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Thu, 28 Jul 2011 15:45:44 +0000 Subject: sdf upload implemented --- application.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'application.rb') diff --git a/application.rb b/application.rb index 2e058bb..328384a 100644 --- a/application.rb +++ b/application.rb @@ -251,6 +251,9 @@ post '/models' do # create a new model if @dataset.metadata[OT.Errors] raise "Incorrect file format. Please follow the instructions for #{link_to "Excel", "/help"} or #{link_to "CSV", "/help"} formats." end + when ".sdf" + sdf = params[:file][:tempfile].read + @dataset.load_sdf(sdf, subjectid) else raise "#{params[:file][:filename]} has an unsupported file type." end -- cgit v1.2.3