Repository navigation
Upload achievement images through Transloadit - #73
Merged
Merged
Conversation
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.
CLI 0.1.100: achievement image uploads now receive signed Transloadit grants from Wavedash. Replace the CLI's Transformer upload with a multipart upload that forwards those parameters unchanged and waits for processing and R2 export to complete before saving the achievement image key.
Reject empty/oversize files, processing failures, and unexpected polling hosts. Upload signing and image-processing rules remain in Convex; no Transloadit secret ships in the CLI.
Requires the backend in https://github.com/wvdsh/wavedash/pull/1202. Older CLI versions need to update after that release; iOS/Android retain their separate legacy avatar endpoint.
Validation: all 81 Rust tests pass;
cargo clippy --all-targets -- -D warningsandrustfmt --check src/achievements.rspass. No dependencies added. A maintained Rust SDK was not found in Transloadit's official SDK list or crates.io, so this uses the existing reqwest dependency.Live integration: ran the actual
wavedash-devfish function (Dopplercli/dev_personal) against the development backend. Created a secret test achievement with a PNG, verified the CDN exported a 640×480 WebP, replaced its image and verified the new 800×600 WebP, then deleted the test achievement and both test R2 objects.Size-limit regression verified through
wavedash-dev: a 20 GB sparse PNG and an empty PNG both returned the expected size error; a normal PNG still uploaded and was readable from the CDN after the bounded-read fix.Also verified a PNG streamed through a named pipe uploads successfully through
wavedash-dev; test records and images were removed.