fix(ai-image-generation): add missing /shelby base path to blob URL - #36
Open
Dusk1e wants to merge 1 commit into
Open
fix(ai-image-generation): add missing /shelby base path to blob URL#36Dusk1e wants to merge 1 commit into
Dusk1e wants to merge 1 commit into
Conversation
NEXT_PUBLIC_SHELBY_API_URL pointed at the host root, so GeneratedImages built https://api.shelbynet.shelby.xyz/v1/blobs/... That path is served by the Aptos fullnode, which has no such route, so every image in the gallery 404s. The blob service is mounted under /shelby, which is what the app's own upload hook and README already use.
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.
Summary
NEXT_PUBLIC_SHELBY_API_URLpoints at the host root, soGeneratedImagesbuildshttps://api.shelbynet.shelby.xyz/v1/blobs/.... That path is served by the Aptos fullnode, which has no such route, so every image in the gallery 404s. The blob service is mounted under/shelby, which the app's own upload hook and the README already use.Tests
curl https://api.shelbynet.shelby.xyz/v1/blobs/<account>/test.pngreturns{"message":"not found","error_code":"web_framework_error","vm_error_code":null}, the fullnode's router 404.curl https://api.shelbynet.shelby.xyz/shelby/v1/blobs/<account>/test.pngreturns{"error":"Blob not found","message":"Blob test.png does not exist for account 0x1"}, so the route resolves and the account and blob name are parsed.With the corrected value, the URL the gallery builds is identical to the one
useUploadImageToShelby.tsxalready returns after an upload.Note
Low Risk
Single-line example env change only; no runtime code changes, but correct local
.envvalues are required for images to load.Overview
Updates
NEXT_PUBLIC_SHELBY_API_URLin.env.examplefrom the API host root tohttps://api.shelbynet.shelby.xyz/shelby.The gallery builds image URLs as
{NEXT_PUBLIC_SHELBY_API_URL}/v1/blobs/.... Without the/shelbyprefix, those requests hit the Aptos fullnode (which has no blob route) and 404; with it, they match the blob service path already used in the README and upload flow.Reviewed by Cursor Bugbot for commit 3dfc4d9. Bugbot is set up for automated code reviews on this repo. Configure here.