lower case check
This commit is contained in:
parent
b6fd0b50ab
commit
6313ad257f
2 changed files with 4 additions and 4 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue