diff --git a/core/server/adapters/storage/LocalFileStorage.js b/core/server/adapters/storage/LocalFileStorage.js index 435bc8bda3..216dd5613e 100644 --- a/core/server/adapters/storage/LocalFileStorage.js +++ b/core/server/adapters/storage/LocalFileStorage.js @@ -164,7 +164,7 @@ class LocalFileStore extends StorageBase { return new Promise((resolve, reject) => { fs.readFile(targetPath, (err, bytes) => { if (err) { - if (err.code === 'ENOENT') { + if (err.code === 'ENOENT' || err.code === 'ENOTDIR') { return reject(new common.errors.NotFoundError({ err: err, message: common.i18n.t('errors.errors.imageNotFoundWithRef', {img: options.path})