Uncaught Error
fangmarks opened this issue · 1 comments
fangmarks commented
Was trying to upload some images to a Image Host instance and encountered this error
this is the code I ran
import * as path from "path";
import * as fs from "fs";
console.log("Starting up")
// @ts-ignore
import * as Elixire from "elixire";
// @ts-ignore
let Uploader = new Elixire({
instance_url: "deadass.graphics",// optional, defaults to elixi.re
apikey: "token", // needed
});
let imagePath = '/home/lio/Downloads/WEREWOLFSTUFF/photos'
fs.readdir(imagePath, (err, files) => {
console.log("Starting to Read dir")
files.forEach(file => {
let currentFile = fs.readFileSync(path.join(imagePath, file))
Uploader.Upload({ buffer: currentFile }).then(r => {
console.log(r)
})
})
})
Not sure what the error might've been but my personal elixire instance might've just died for a second, I'm not really sure
fangmarks commented