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

fix: upload Cover Image file error for Safari Browser #146

Merged
merged 4 commits into from
Oct 17, 2023

Conversation

ZiyadBoshima
Copy link
Collaborator

@ZiyadBoshima ZiyadBoshima commented Oct 15, 2023

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

Chrome
Screen Shot 2023-10-15 at 3 35 55 AM

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

  • [x ] Related issues linked using fixes #135
  • Integration tests added
  • Errors have a helpful link attached, see contributing.md

Feature

  • Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
  • Related issues linked using fixes #number
  • Integration tests added
  • Documentation added

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-bot
Copy link

changeset-bot bot commented Oct 15, 2023

🦋 Changeset detected

Latest 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

@vercel
Copy link

vercel bot commented Oct 15, 2023

Someone is attempting to deploy a commit to a Personal Account owned by @avitorio on Vercel.

@avitorio first needs to authorize it.

@avitorio
Copy link
Owner

Thank you @ZiyadBoshima! I'll review it soon!

@vercel
Copy link

vercel bot commented Oct 15, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
outstatic-canary ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 16, 2023 0:11am
outstatic-dev-blog ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 16, 2023 0:11am
outstatic-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 16, 2023 0:11am

Copy link
Owner

@avitorio avitorio left a 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!

.changeset/shiny-hats-knock.md Outdated Show resolved Hide resolved
Co-authored-by: Andre Vitorio <andre@vitorio.net>
Copy link
Owner

@avitorio avitorio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent, thanks!

@avitorio avitorio merged commit 0400338 into avitorio:canary Oct 17, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants