diff options
author | Christoph Helma <helma@in-silico.ch> | 2011-07-28 15:45:44 +0000 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2011-07-28 15:45:44 +0000 |
commit | b8d1c67894585729573e4e7270141f36924d0ac7 (patch) | |
tree | df3cda367c2d3ccf15037a771fb7766bbded16f6 /application.rb | |
parent | 41945b3dc251ca00580916c3cbc7d26c2093ca89 (diff) |
sdf upload implemented
Diffstat (limited to 'application.rb')
-rw-r--r-- | application.rb | 3 |
1 files changed, 3 insertions, 0 deletions
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 |