After upgrading to the newest version I am no longer able to access any imagery via the its url. Following console output is shown when any file is accessed via /uploads/filename.ext
IPX Error (File not found (/Users/fabio_nettis/github/bucan-labs/application/api/public/uploads/organization/banner/ekz_hauptsitz_d1d858b79b.jpg))
IPXError: File not found (/Users/fabio_nettis/github/bucan-labs/application/api/public/uploads/organization/banner/ekz_hauptsitz_d1d858b79b.jpg)
at createError (/Users/fabio_nettis/github/bucan-labs/application/api/node_modules/ipx/dist/shared/ipx.eadce322.cjs:76:15)
at Object.filesystem (/Users/fabio_nettis/github/bucan-labs/application/api/node_modules/ipx/dist/shared/ipx.eadce322.cjs:94:15)
at async ipxMiddleware (/Users/fabio_nettis/github/bucan-labs/application/api/node_modules/strapi-plugin-local-image-sharp/src/middleware.js:89:19) {
statusMessage: 'IPX: File not found',
statusCode: 404
}
According to this forum post following line in the plugins code is causing the above error, might be worth looking into.
const ipx = createIPX({
dir: `${strapi.dirs?.dist?.public ?? strapi.dirs?.public}/uploads`,
})
// [Possible fix]: The variable strapi.dirs.public is undefined and I just added an ?? “public” and it works.
const ipx = createIPX({
dir: `${strapi.dirs?.dist?.public ?? strapi.dirs?.public ?? "public"}/uploads`,
})
Steps to reproduce
Install latest version of the plugin
Upload some media to local provider
Try to access uploaded media via the created url
Expected behaviour
Obviously the media should be accessible through the url if present in the directory.
Description
After upgrading to the newest version I am no longer able to access any imagery via the its url. Following console output is shown when any file is accessed via
/uploads/filename.ext
According to this forum post following line in the plugins code is causing the above error, might be worth looking into.
Steps to reproduce
Expected behaviour
Obviously the media should be accessible through the url if present in the directory.
Environment
Additional context
N/A