Page 1 of 1

Get text of .txt file from database

Posted: Fri Jul 25, 2014 7:55 am
by Nikolai Grachev

Hi!
How can I get text of .txt file from appery.io database and print it to "label" form?


Get text of .txt file from database

Posted: Fri Jul 25, 2014 1:04 pm
by Maryna Brodina

Hello!

Here is how to get file from DB http://devcenter.appery.io/documentat..., save it to file variable, for example:
prevar file = $.get(fileUrl);/prewhere fileUrl - link to the DB file

Then save file value to the lable preApperyio("labelName").text(file.responseText);/pre


Get text of .txt file from database

Posted: Fri Jul 25, 2014 7:29 pm
by Nikolai Grachev

Thank you!


Get text of .txt file from database

Posted: Tue Jul 29, 2014 8:35 am
by Nikolai Grachev

This works better:

var db_url = "https://api.appery.io/rest/1/db/files//"

Apperyio("label_name").load( db_url )


Get text of .txt file from database

Posted: Tue Jul 29, 2014 8:37 am
by Evgene Karachevtsev

Hello Nickolai,

Thank you for the update!