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

upload: handle no publicUrlBase #3282

Conversation

jamesacklin
Copy link
Member

@jamesacklin jamesacklin commented Feb 23, 2024

Fixes a TypeError in upload.ts when uploading to a S3 bucket without a publicUrlBase set in the %storage config.

Uploading an image was throwing a Uncaught (in promise) TypeError: Failed to construct 'URL': Invalid URL error. I interpret this to mean that we were failing to instantiate a variable with a URL type because the new URL() function takes a single argument (which cannot be null). Open to other, cleaner fixes.

Tested locally with the Vite dev server proxied against my livenet planet.

PR Checklist

  • Includes changes to desk files
  • Describes how you tested the PR locally (test ship vs livenet)
  • If a new feature, includes automated tests
  • Comments added anywhere logic may be confusing without context

Copy link

linear bot commented Feb 23, 2024

Copy link
Member

@patosullivan patosullivan left a comment

Choose a reason for hiding this comment

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

lgtm, thanks!

@patosullivan patosullivan merged commit 000414d into develop Feb 23, 2024
1 check passed
@patosullivan patosullivan deleted the james/land-1615-groups-attaching-an-image-fails-with-self-hosted-s3 branch February 23, 2024 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants