lower case check

This commit is contained in:
Zutatensuppe 2021-04-21 10:15:08 +02:00
parent b6fd0b50ab
commit 6313ad257f
2 changed files with 4 additions and 4 deletions

View file

@ -16,10 +16,10 @@ async function getExifOrientation(imagePath) {
})
}
const dir = `${process.env.RUN_DIR}/data/uploads`
const dir = `./../data/uploads`
const images = fs.readdirSync(dir)
images.forEach(async (image) => {
if (!image.match(/\.(jpe?g|webp|png)$/)) {
if (!image.toLowerCase().match(/\.(jpe?g|webp|png)$/)) {
return
}
console.log(image)