examples/api-samples/samples/sample05.rb in groupdocs-1.8.0 vs examples/api-samples/samples/sample05.rb in groupdocs-1.8.1
- old
+ new
@@ -48,11 +48,11 @@
#Construct path
filepath = "#{Dir.tmpdir}/#{params[:file][:filename]}"
#Open file
File.open(filepath, 'wb') { |f| f.write(params[:file][:tempfile].read) }
#Make a request to API using client_id and private_key
- file = GroupDocs::Storage::File.upload!(filepath, {})
+ file = GroupDocs::Storage::File.upload!(filepath, {overrideMode: 3})
when 'url'
file = GroupDocs::Storage::File.upload_web!(settings.url)
else
raise 'Wrong GUID source.'
end
@@ -69,10 +69,10 @@
button = settings.move
end
#Result message
if file
- massage = "File was #{button}'ed to the <font color=\"blue\">#{settings.dest_path}</font> folder"
+ massage = "<h4><span style=\"color: green\">File was #{button}'ed to the <font color=\"blue\">#{settings.dest_path}</font> folder</span></h4>"
end
rescue Exception => e
err = e.message
end