%h3{:style => 'text-align:center;'} %a{:href => '/'} GroupDocs Ruby SDK Samples \- Sample03 .samplecontent{:style => 'padding:10px;'} %i This sample will show how to use StorageApi to upload test file to GroupDocs account using Ruby SDK %br/ %br/ %span.documentation %a{:href => '/docs/sample03.html'} Builtin documentation for this sample %br/ %br/ %p You entered: %p UserId = #{(defined? user_id) ? user_id : ''} %p PrivateKey = #{(defined? private_key) ? private_key : ''} %p %font{:color => 'red'} #{(defined? err) ? err : ''} %br/ #requestForm{:style => 'padding:20px; border:1px solid black;'} %p Enter data for request and press "Make request" button %form{:action => '/sample03', :enctype => 'multipart/form-data', :method => 'post'} %label{:for => 'clientId'} GroupDocs ClientID %br/ %input{:type=>'text', :name=>'clientId'} %br/ %label{:for => 'privateKey'} GroupDocs PrivateKey %br/ %input{:type=>'text', :name=>'privateKey'} %br/ %div.guid_radio %input{:type=>'radio', :name=>'source', :value=>'file', :checked=>'checked'}Upload local file %br/ %input{:type=>'radio', :name=>'source', :value=>'url'} Upload file from URL %br/ %br/ %div.guid_field %label{:for=>'file'} Upload local file %br/ %input{:type=>'file', :name=>'file'} %br/ %div.guid_field{:style=>'display:none;'} %label{:for=>'url', :id=>'url'} Upload file from URL %br/ %input{:type=>'text',:size=>'75', :name=>'url'} %br/ %label{:for => 'folderPath'} Folder Path %span{:class => 'optional'} (Optional) %br/ %input{:type=>'text', :name=>'folderPath'} %br/ %label{:for => 'callback'} Callback Url %span{:class => 'optional'} (Optional) %br/ %input{:type=>'text', :name=>'callback'} %br/ %label{:for => 'base_path'} Base Path %span{:class => 'optional'} (Optional) %br/ %input{:type=>'text', :name=>'basePath'} %br/ %input{:type => 'submit', :value => 'Upload'}/ %div{:style => 'padding:20px; border:1px solid black;'} %p Results: #{(defined? massage) ? massage : ''} #{(defined? iframe) ? iframe : ''} = partial :_others_samples :javascript $(function($){ $('.guid_radio input').change(function(){ var elementIndex = $(this).parent().children('input').index($(this)); $('.guid_field').hide(); $('.guid_field').eq(elementIndex).show(); }); });