diff --git a/core/server/adapters/storage/LocalFileStorage.js b/core/server/adapters/storage/LocalFileStorage.js index 8ca4293ee5..435bc8bda3 100644 --- a/core/server/adapters/storage/LocalFileStorage.js +++ b/core/server/adapters/storage/LocalFileStorage.js @@ -171,6 +171,10 @@ class LocalFileStore extends StorageBase { })); } + if (err.code === 'ENAMETOOLONG') { + return reject(new common.errors.BadRequestError({err: err})); + } + return reject(new common.errors.GhostError({ err: err, message: common.i18n.t('errors.errors.cannotReadImage', {img: options.path})