Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expanded try catch around extracting metadata #10497

Merged
merged 4 commits into from
Dec 14, 2021
Merged

Expanded try catch around extracting metadata #10497

merged 4 commits into from
Dec 14, 2021

Conversation

keesvanbemmel
Copy link
Contributor

@keesvanbemmel keesvanbemmel commented Dec 14, 2021

Ran into an issue with extracting metadata using Sharp:
Error: Input buffer has corrupt header: pngload_buffer: too many text chunks

Expanding the try catch will allow the image still to be uploaded, without metadata.

@paescuj
Copy link
Member

paescuj commented Dec 14, 2021

Thanks @keesvanbemmel! Could you add two more try...catch statements, one for sharp and one for exifr? This way the exifr part will still be performed even when sharp has failed.

@keesvanbemmel
Copy link
Contributor Author

Thanks @keesvanbemmel! Could you add two more try...catch statements, one for sharp and one for exifr? This way the exifr part will still be performed even when sharp has failed.

Sure! done!

@azrikahar
Copy link
Contributor

@keesvanbemmel thanks for the PR!


Just a note to maintainers, we should include/move the try catch here when merging #9564.

@rijkvanzanten
Copy link
Member

Just a note to maintainers,

You mean yourself @azrikahar? 😄

@rijkvanzanten rijkvanzanten added this to the v9-next milestone Dec 14, 2021
@rijkvanzanten rijkvanzanten self-assigned this Dec 14, 2021
@rijkvanzanten rijkvanzanten merged commit 549b9ee into directus:main Dec 14, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants