Skip to content

fix: NFT collection ZIP: nested folders, errors, gateway examples#135

Open
0xCardiE wants to merge 1 commit into
mainfrom
fix/nft_uploads
Open

fix: NFT collection ZIP: nested folders, errors, gateway examples#135
0xCardiE wants to merge 1 commit into
mainfrom
fix/nft_uploads

Conversation

@0xCardiE
Copy link
Copy Markdown
Collaborator

@0xCardiE 0xCardiE commented May 11, 2026

Summary

Fixes and UX improvements for Upload NFT collection when the ZIP does not have images/ and json/ at the archive root (for example Hardhat-style build/images and build/json). Also improves failure messaging and the success panel.

Changes

NFTCollectionProcessor.ts

  • Normalize paths (\/), ignore __MACOSX and .DS_Store.
  • Detect files under images/ or json/ at any depth using the nearest qualifying folder segment before the filename (so zipping build/ works).
  • On failure, errors include a short sample of paths found in the ZIP plus concise layout guidance.

SwapComponent.tsx + SwapComponent.module.css

  • NFT collection tooltip: notes that a parent folder in the ZIP is OK (build/images, build/json).
  • After a successful NFT upload, How to load each token file shows gateway URLs only, each as a clickable link opening in a new tab (1.json / 1.png examples).
  • Error messages allow wrapping (pre-wrap / overflow-wrap) for long diagnostics.

How to verify

  1. Create a ZIP whose paths look like build/images/0.png and build/json/0.json; upload with Upload NFT collection — processing should succeed.
  2. Trigger a bad ZIP (no images/json folders); confirm the error lists sample paths and explains the layout.
  3. After success, confirm the two gateway links open the JSON and PNG examples in a new tab.
image

- Resolve images/ and json/ at any depth (e.g. build/images, build/json)
- Skip __MACOSX junk; normalize paths; classify via nearest folder segment
- Errors include sample ZIP paths and expected layout guidance
- Post-upload section: clickable gateway URLs open in new tab
- Tooltip notes parent-folder zips; error text wraps in UI
@0xCardiE 0xCardiE changed the title NFT collection ZIP: nested folders, errors, gateway examples fix: NFT collection ZIP: nested folders, errors, gateway examples May 11, 2026
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.

1 participant