-
-
Notifications
You must be signed in to change notification settings - Fork 156
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
fix: upload Cover Image file error for Safari Browser #146
Conversation
ShowImage boolean was being set to true before the file is read. This triggered the OnError() callback of the img tag in Safari. For some reason Google Chrome, does not complain about this. After removing the extra setShowImage(true) line, upload cover image using a file works for both Chrome and Safari.
🦋 Changeset detectedLatest commit: 0d1183c The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Someone is attempting to deploy a commit to a Personal Account owned by @avitorio on Vercel. @avitorio first needs to authorize it. |
Thank you @ZiyadBoshima! I'll review it soon! |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Once you make the change I'll merge the PR!
Co-authored-by: Andre Vitorio <andre@vitorio.net>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent, thanks!
ShowImage boolean was being set to true before the file is read. This triggered the OnError() callback of the img tag in Safari.
Below are screenshots of what the console looked like when the setShowImage(true) was there (I added logs for tracing):
Safari
![Screen Shot 2023-10-15 at 3 35 21 AM](https://private-user-images.githubusercontent.com/137479354/275293816-f2d45ee3-9b6b-4029-a093-ff67be7dbda8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUyNzU2NDMsIm5iZiI6MTcyNTI3NTM0MywicGF0aCI6Ii8xMzc0NzkzNTQvMjc1MjkzODE2LWYyZDQ1ZWUzLTliNmItNDAyOS1hMDkzLWZmNjdiZTdkYmRhOC5w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FhM2QxZjc5NzdkOWUwMGFlMDVmMTI5ODFiYTVhMGViZmFjNjVhMzQzNzViZTBiMTc0ZTlkJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.Om4v6TOByH0kPIBk3TgC5vpsxQ179-kKnoJo070Ro58)
For some reason Google Chrome, does not complain about this.
After removing the extra setShowImage(true) line, upload cover image using a file works for both Chrome and Safari.
Bug
fixes #135
contributing.md
Feature
fixes #number