<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[CloudBackEnd DownloadFile]]></title><description><![CDATA[<p dir="auto">Hi Team,</p>
<p dir="auto">Im trying to download a file using appdrag-cloudbackend. As indicated in the documentation, i've done all the steps and getting the success response. But still the file is not downloaded.</p>
<p dir="auto"><strong>My app.js</strong><br />
$('#getDownloadFile').on('click', function(){<br />
fetch('https://*****.appdrag.site/api/downloadFile',{<br />
method: 'GET',<br />
}).then(res=&gt;{<br />
console.log('successfully sent');<br />
console.log(res);<br />
return res;<br />
}).catch(err=&gt;console.log(err.message));<br />
});</p>
<p dir="auto"><strong>My CloudBackend function</strong><br />
var cloudbackend = require('appdrag-cloudbackend');<br />
// INIT FROM CODE VARIABLES<br />
cloudbackend.init('your_api_key', 'your_app_id');<br />
// INIT FROM ENVIRONMENT VARIABLES<br />
cloudbackend.init(process.env.APIKEY, process.env.APPID);</p>
<p dir="auto">exports.handler = async (event, context, callback) =&gt; {<br />
cloudbackend.downloadRemoteFile("<a href="https://s3-eu-west-1.amazonaws.com/dev.appdrag.com/*****/CloudBackend/files/66dc8825-7c34-4b71-914b-ec85393caebc.txt" rel="nofollow ugc">https://s3-eu-west-1.amazonaws.com/dev.appdrag.com/*****/CloudBackend/files/66dc8825-7c34-4b71-914b-ec85393caebc.txt</a>", "test.txt").then( function(response) {<br />
return response;<br />
});<br />
};</p>
<p dir="auto"><strong>My log messages</strong><br />
successfully sent<br />
Response {type: "basic", url: "https://*****.appdrag.site/api/downloadFile", redirected: false, status: 200, ok: true, …}body: (...)bodyUsed: falseheaders: Headers {}ok: trueredirected: falsestatus: 200statusText: ""type: "basic"url: "https://****.appdrag.site/api/downloadFile"<strong>proto</strong>: Response</p>
<p dir="auto">What am i missing to make the download happen ?</p>
]]></description><link>https://community.appdrag.com/topic/235/cloudbackend-downloadfile</link><generator>RSS for Node</generator><lastBuildDate>Mon, 17 Aug 2026 08:24:46 GMT</lastBuildDate><atom:link href="https://community.appdrag.com/topic/235.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 15 Jul 2020 15:36:05 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to CloudBackEnd DownloadFile on Thu, 16 Jul 2020 05:22:18 GMT]]></title><description><![CDATA[<p dir="auto">Instead of calling the download with fetch, from the client side just make a A Link pointing to the url of your cloud function</p>
<p dir="auto">You can also check our NodeJS samples to return a binary file</p>
]]></description><link>https://community.appdrag.com/post/803</link><guid isPermaLink="true">https://community.appdrag.com/post/803</guid><dc:creator><![CDATA[Joseph Benguira]]></dc:creator><pubDate>Thu, 16 Jul 2020 05:22:18 GMT</pubDate></item></channel></rss>