Hi there,
I am developing a thiny web client for Dropbox using the Javascript API. What I want to have is the basic functionality (upload, download, and delete files) from an account.
I am having trouble with the downloadFile function which I don't really understand and doesn't work as I expected. I have to say that I am learning JS, and sorry, but not found so much documentation about that. I've read the API documentation.
This is my code:
function downloadFile(){
var itemValue = obtenerItemValue();
if (itemValue == null)
alert('Hay que seleccionar antes un archivo');
else{
alert('Archivo a descargar: ' + itemValue);
dbx.filesDownload({path: '/' + itemValue})
.then(function(response) {
})
.catch(function(err) {
console.log(err);
callback('Error downloading file using the Dropbox API');
});
recargarItems();
}
}
And I don't know what to do, the action send a POST message and gets back a response in application/byte type, as shown here:

Anyone could help me please?
Thanks