fix(api): accept is_server in S3Storage so v1 asset endpoints stop 500ing - #4
Merged
Merged
Conversation
…0ing
plane/api/views/asset.py constructs `S3Storage(request=request, is_server=True)`
in three places, but `S3Storage.__init__` only takes `request`. Every call
raised TypeError, so all three public-API asset endpoints answered 500 --
including GET /api/v1/workspaces/{slug}/assets/{asset_id}/, the only
x-api-key route that turns a comment image's asset id into a download URL.
Found because psyclo relays a developer's comment images to a bug reporter by
email: the fetch failed on every image, silently.
The argument is accepted and has no effect yet. Its callers hand the presigned
URL to a client outside Plane's network, so the public endpoint -- the existing
default -- is already what they need.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SsBurBNYE4Wxpx2k6atqcj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
plane/api/views/asset.pyconstructsS3Storage(request=request, is_server=True)in three places, butS3Storage.__init__only acceptsrequest. Every call raisesTypeError, so all three public-API asset endpoints answer 500:GET /api/v1/workspaces/{slug}/assets/{asset_id}/— presigned downloadReproduced live:
The GET is the only
x-api-keyroute that turns a comment image's asset id (thesrcon<image-component>) into a download URL. Found because psyclo relays a developer's comment images to a bug reporter by email, and every fetch failed silently.Fix
Accept
is_server=FalseonS3Storage.__init__. It has no effect yet: its callers hand the presigned URL to a client outside Plane's network, so the public endpoint — the existing default — is already what they need.One file, no behaviour change for any existing caller.
🤖 Generated with Claude Code
https://claude.ai/code/session_01SsBurBNYE4Wxpx2k6atqcj