Commit 9ead0ca0 authored by charlie-ablett's avatar charlie-ablett

File download complete

parent 2d4acf42
Pipeline #320 skipped
export function downloadFile(downloadPath, fileName, appState) {
const { authToken, tokenType, client, expiry, uid } = appState;
const downloader = require('file-downloader');
window.downloader.get(downloadPath, fileName, {
'Accept': 'application/vnd.ink.v1',
'Access-Token': authToken,
'Client': client,
'Token-Type': tokenType,
'Expiry': expiry,
'uid': uid
})
.then(fileName => console.log(`File ${fileName} has been downloaded!`));
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment