This snippet download file using got and save it to filename.ext
const got = require("got");
const { createWriteStream } = require("fs");
const url = "https://bucket.s3.amazonaws.com/filename.ext";
got.stream(url).pipe(createWriteStream('filename.ext'));
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…