so, I've been trying to download files on the node side and serving them to front but it keeps corrupting my binary data. Using request, axios, ...My current code to give you an idea: axios(url, { method: 'GET', responseType: 'arrayBuffer', headers: { 'x-user': getEnvironment().DB_USER, 'x-password': getEnvironment().DB_PASSWORD } }) .then(response => { res.json({ error: null, data: response.data }) }) .catch(e => { res.json({error: e.message, data: []}) }) Any help is appreciated :D
Submitted January 08, 2018 at 03:42PM by vadeka
No comments:
Post a Comment