auths
objectThe URL you'd like to download
You can store any files to the /tmp
directory. Enter that filename here.
return
or this.key = 'value'
, pass input data to your code viaparams
, and maintain state across executions with$checkpoint.async
(event, steps, params) => {
}
const fs = require('fs');
const got = require("got")
const stream = require('stream');
const { promisify } = require('util');
// DOWNLOAD
const pipeline = promisify(stream.pipeline);
await pipeline(
got.stream(params.downloadURL),
fs.createWriteStream(params.filePath)
);
auths
objectreturn
or this.key = 'value'
, pass input data to your code viaparams
, and maintain state across executions with$checkpoint.async
(event, steps) => {
}
const fs = require("fs");
this.fileData = fs.readFileSync(`/tmp/example.html`).toString();