3 Replies Latest reply on Jul 13, 2013 11:23 AM by Kutir Mobility

    Filetransfer seems not working and is it the good solution

      Hi there,


      My first question

      I followed step by step a ruby example for downloading files finding here http://docs.rhomobile.com/rhoelements/FileTransfer


      So I made a called Rhomodel FileTransfer.

      In the file_transfer_controller.rb, i added  this :

      require 'autocomplete/FileTransfer'


      And in the class, i added this :


        def downloadFile

            FileTransfer.transferEvent=url_for(:action => :transferEventListener)


            v_destination = File.join(Rho::RhoApplication::get_base_app_path(), '/public/images/actu_vinisudw.jpg')





      In my app/index.erb i added this :

      <script type="text/javascript">

      function tranferLocal() {

         alert('go !');

          $.get('/app/FileTransfer/downloadFile', { });

          return false;




      <button onclick="tranferLocal();" >Transfer file locally</button>


      I don't receive my image. I have no error. I checked everything i can and i don't understand where's my mistake.


      My second question :

      I'm not sure is the good solution for making a app which :

      - download multiple binary files (pdf, jpg...) on device with some filesize > 4 M.

      - download script for populate database on device


      I saw Rhoconnect with sync and followed the tuto.

      What do you think ?