Conversation
…_ replacement Switches image drop uploads from source.save to source.uploadMedia, and replaces the FPO placeholder immediately for relative ./media_ content URLs instead of waiting on the pre-download <img> load event. Updates the nx2 api test fixture with the uploadMedia mock and adds coverage for both behaviors. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch.
Commits
|
kptdobe
approved these changes
Aug 7, 2026
3 tasks
tripodsan
added a commit
that referenced
this pull request
Aug 10, 2026
Mirrors #1219's switch for dropped images: source.save assumed the upload path itself was the final addressable URL, but uploadMedia content-addresses the file, so the real URL (now possibly a relative ./media_... path) is only known from the response. Swap each pasted image's FPO placeholder for that response URL as soon as its own upload resolves, instead of waiting for every pasted image to finish. Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
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
blocks/edit/prose/plugins/imageDrop.js) fromsource.savetosource.uploadMedia.contentUrlis a relative media reference (starts with./media_), the FPO placeholder is replaced immediately instead of waiting for the pre-download<img>element'sloadevent.source.uploadMediato thenx2api test fixture (test/fixtures/nx2/utils/api.js), which was missing and caused 4 existing tests to fail withsource.uploadMedia is not a function.test/unit/blocks/edit/prose/plugins/imageDrop.test.jsfor both behavior changes.Notes
Test plan
npx wtr "./test/unit/blocks/edit/prose/plugins/imageDrop.test.js" --node-resolve --port=2001— 11/11 tests pass.npm test(full unit suite) — 1781 passed, 0 failed, 4 skipped (unrelated).npx eslinton all changed files — clean.🤖 Generated with Claude Code