Hi,
I have uploaded a csv file to the pre-defined "Files" database collection. I need to retrieve the content of this file using a server code script and perform operations on its contents. I have read through the server code documentation and can successfully retrieve all the file content using an XHR GET request. This is what I have so far in the script (I have blanked out database ID and master key for security):
var XHRResponse = XHR.send("GET", "https://api.appery.io/rest/1/db/files", {
"headers": {
"X-Appery-Database-Id": "xxxx",
"X-Appery-Master-Key": "xxxx"
},
"parameters": {
"where": '{"Original File Name":"challenges_011515"}'
}
});
response.success(XHRResponse.body, "text/plain");
console.dir(XHRResponse);
But as far as I can tell this code only returns all the information in the columns of the Files collection, how do I retrieve the actual file or its content using server code script? Ultimately I have a 3rd party library I would like to use to parse the rows of csv data to JSON objects.
Thanks.
This is w