parent
aef8ce0938
commit
5164061f22
1 changed files with 1 additions and 0 deletions
1
index.js
1
index.js
|
@ -210,6 +210,7 @@ async function downloadFromActivity(activity) {
|
||||||
var fp = path.join(imgCache, fn)
|
var fp = path.join(imgCache, fn)
|
||||||
|
|
||||||
if (!cachedImages.imgs[url] || !fs.existsSync(path.join(imgCache, cachedImages.imgs[url].file))) {
|
if (!cachedImages.imgs[url] || !fs.existsSync(path.join(imgCache, cachedImages.imgs[url].file))) {
|
||||||
|
console.log(fn)
|
||||||
const response = await (await fetch(thumborURL + imgRes + thumborArgs + url)).arrayBuffer()
|
const response = await (await fetch(thumborURL + imgRes + thumborArgs + url)).arrayBuffer()
|
||||||
|
|
||||||
fs.writeFileSync(fp, Buffer.from(response))
|
fs.writeFileSync(fp, Buffer.from(response))
|
||||||
|
|
Loading…
Reference in a new issue