oops
This commit is contained in:
parent
d13fdc8927
commit
cddcb51a57
1 changed files with 2 additions and 1 deletions
3
index.js
3
index.js
|
@ -61,6 +61,7 @@ app.get("/cached/*", (req, res) => {
|
||||||
imgWait += 0.1
|
imgWait += 0.1
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
imgData = cachedImages.imgs[imgURL]
|
imgData = cachedImages.imgs[imgURL]
|
||||||
|
console.log(imgData)
|
||||||
if (imgData) {
|
if (imgData) {
|
||||||
fs.createReadStream(path.join(imgCache, imgData.file)).pipe(res)
|
fs.createReadStream(path.join(imgCache, imgData.file)).pipe(res)
|
||||||
} else {
|
} else {
|
||||||
|
@ -87,7 +88,7 @@ var cachedImages = JSON.parse(fs.readFileSync(cacheFile))
|
||||||
var constants = JSON.parse(fs.readFileSync(path.join(__dirname, "constants.json")))
|
var constants = JSON.parse(fs.readFileSync(path.join(__dirname, "constants.json")))
|
||||||
var activityImages = constants.activityImages
|
var activityImages = constants.activityImages
|
||||||
|
|
||||||
var thumborURL = "https://thumbor-production-0e82.up.railway.app/"
|
var thumborURL = "https://thumbor-production-0e82.up.railway.app/unsafe"
|
||||||
var imgExtension = "png"
|
var imgExtension = "png"
|
||||||
var thumborArgs = `filters:format(${imgExtension})/`
|
var thumborArgs = `filters:format(${imgExtension})/`
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue