I'm facing an issue with the Cloudflare R2 storage adapter (ghost-cloudflare-r2) for Ghost v5.87.1. When uploading videos or audio files, the thumbnail/cover image generation is failing.
The upload itself seems to work, but the thumbnail/cover image is either missing or displaying incorrectly. Here's the relevant error log:
ERROR "PUT /ghost/api/admin/media/thumbnail/upload/" 500 94ms
"mediaStorage.urlToPath is not a function"
TypeError: mediaStorage.urlToPath is not a function
at prepareError (/var/www/ghost/versions/5.87.1/node_modules/@tryghost/mw-error-handler/lib/mw-error-handler.js:113:19)
at Object.query (/var/www/ghost/versions/5.87.1/core/server/api/endpoints/media.js:39:57)
at Object.query (/var/www/ghost/versions/5.87.1/node_modules/@tryghost/api-framework/lib/pipeline.js:159:24)
at getResponse (/var/www/ghost/versions/5.87.1/node_modules/@tryghost/api-framework/lib/pipeline.js:259:47)
at async ImplWrapper (/var/www/ghost/versions/5.87.1/node_modules/@tryghost/api-framework/lib/pipeline.js:264:30)
at async Http (/var/www/ghost/versions/5.87.1/node_modules/@tryghost/api-framework/lib/http.js:70:28)
Could you please take a look at this and provide any guidance or suggestions on how to resolve this thumbnail generation issue with videos and audios?
Hi there
I'm facing an issue with the Cloudflare R2 storage adapter (
ghost-cloudflare-r2
) for Ghost v5.87.1. When uploading videos or audio files, the thumbnail/cover image generation is failing.The upload itself seems to work, but the thumbnail/cover image is either missing or displaying incorrectly. Here's the relevant error log: ERROR "PUT /ghost/api/admin/media/thumbnail/upload/" 500 94ms
NAME: InternalServerError CODE: UNEXPECTED_ERROR MESSAGE: An unexpected error occurred, please try again.
level: critical
"mediaStorage.urlToPath is not a function" TypeError: mediaStorage.urlToPath is not a function at prepareError (/var/www/ghost/versions/5.87.1/node_modules/@tryghost/mw-error-handler/lib/mw-error-handler.js:113:19) at Object.query (/var/www/ghost/versions/5.87.1/core/server/api/endpoints/media.js:39:57) at Object.query (/var/www/ghost/versions/5.87.1/node_modules/@tryghost/api-framework/lib/pipeline.js:159:24) at getResponse (/var/www/ghost/versions/5.87.1/node_modules/@tryghost/api-framework/lib/pipeline.js:259:47) at async ImplWrapper (/var/www/ghost/versions/5.87.1/node_modules/@tryghost/api-framework/lib/pipeline.js:264:30) at async Http (/var/www/ghost/versions/5.87.1/node_modules/@tryghost/api-framework/lib/http.js:70:28)
Could you please take a look at this and provide any guidance or suggestions on how to resolve this thumbnail generation issue with videos and audios?
Thank you!