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