feat: adding a processor to store b64 images in course assets#27
Merged
feat: adding a processor to store b64 images in course assets#27
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a processor that converts base64-encoded badge images into course assets and returns a public URL, using a configurable contentstore wrapper to avoid importing CMS modules at import time.
Changes:
- Added
BadgeImageUploadProcessorto decode base64 PNGs, upload to course assets, and return a public asset URL. - Introduced a contentstore wrapper + Redwood backend module selected via
OPENEDX_AI_BADGES_CONTENTSTORE_BACKEND. - Added unit tests for both the wrapper and the new processor behavior.
Reviewed changes
Copilot reviewed 7 out of 9 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| backend/openedx_ai_badges/processors/badge_image_upload_processor.py | Implements base64 decode → asset upload → public URL generation |
| backend/openedx_ai_badges/edxapp_wrapper/contentstore.py | Adds dynamic backend delegation for contentstore APIs |
| backend/openedx_ai_badges/edxapp_wrapper/backends/contentstore_r_v1.py | Redwood backend bindings to platform contentstore APIs |
| backend/openedx_ai_badges/settings/common.py | Registers default contentstore backend setting |
| backend/openedx_ai_badges/workflows/orchestrators.py | Adds processor import for orchestrator usage |
| backend/tests/test_badge_image_upload_processor.py | Tests successful upload, conversions, and failure modes |
| backend/tests/test_contentstore_wrapper.py | Tests wrapper delegation and delayed imports |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ba2b528 to
6a5919c
Compare
6a5919c to
161ea7b
Compare
6645317 to
6b9bc1a
Compare
Member
Author
|
@Henrrypg ready for your review |
Henrrypg
approved these changes
Apr 8, 2026
Collaborator
Henrrypg
left a comment
There was a problem hiding this comment.
It is working fine, thanks @felipemontoya
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.
This PR adds a image processor that is capable of uploading the b64 image into assets in the course that authors can see in the files tab.
Then the orchestrator removes the Base 64 version and turns it into a URL that can be published and accessed publicly.