Hi,
How the best way to get attached file saved like blob on table and send to rest webservice using javascript click delegate?
Regards,
Hi,
How the best way to get attached file saved like blob on table and send to rest webservice using javascript click delegate?
Regards,
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