summaryrefslogtreecommitdiff
path: root/lib/dataset.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dataset.rb')
-rw-r--r--lib/dataset.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/dataset.rb b/lib/dataset.rb
index ed0ccdd..a6c22d0 100644
--- a/lib/dataset.rb
+++ b/lib/dataset.rb
@@ -13,9 +13,9 @@ module OpenTox
append RDF.type, RDF::OT.OrderedDataset
end
- def upload filename
- file = File.new filename
- RestClientWrapper.put(@uri, {:file => file}, {:subjectid => @subjectid})
+ def upload filename, wait=true
+ uri = RestClientWrapper.put(@uri, {:file => File.new(filename)}, {:subjectid => @subjectid})
+ OpenTox::Task.new(uri).wait if URI.task?(uri) and wait
end
def get