Nikolai Grachev
Posts: 0
Joined: Fri Jul 25, 2014 7:55 am

Get text of .txt file from database

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

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Get text of .txt file from database

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

Nikolai Grachev
Posts: 0
Joined: Fri Jul 25, 2014 7:55 am

Get text of .txt file from database

Thank you!

Nikolai Grachev
Posts: 0
Joined: Fri Jul 25, 2014 7:55 am

Get text of .txt file from database

This works better:

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

Apperyio("label_name").load( db_url )

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Get text of .txt file from database

Hello Nickolai,

Thank you for the update!

Return to “Issues”