Results 1 to 2 of 2

Thread: send file saved on table to RESTfull webservice

  1. #1
    Member
    Join Date
    Feb 2012
    Location
    São Paulo - Brasil
    Posts
    94

    send file saved on table to RESTfull webservice

    Hi,

    How the best way to get attached file saved like blob on table and send to rest webservice using javascript click delegate?

    Regards,

  2. #2
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,165
    Blog Entries
    22
    Hi Jefferson,

    I'm assuming you mean in a web/mobile app?

    That being the case on the client you can see what the current rowid is for a cursor.

    var csr = Lianja.getCursor("attachments")
    Lianja.evaluate(format("sendAttachment('{0}', '{1}', '{2}', {3})", Lianja.App.database, csr.table, 'attachmentcolumn', csr.rowid));

    The sendAttachment() server side proc can just extract the attachment into an external file using objectWrite()

    Then use the networkrequest class postFile() method.
    https://www.lianja.com/doc/index.php/NetworkRequest
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us