feat: custom wallpaper upload#2108
Open
KenobiNakamoto wants to merge 1 commit intogetumbrel:masterfrom
Open
Conversation
Adds the ability to upload any image as a custom desktop wallpaper. Right-click the desktop → Change Wallpaper → click the Upload tile → choose an image. Co-Authored-By: Claude Sonnet 4.6 <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
Add support for uploading custom wallpapers to umbrelOS, allowing users to personalise their home screen beyond the built-in options.
Closes #1622. Closes #2077.
What changed
Backend (
umbreld)saveCustomWallpapermethod on theUserclass that persists uploaded images to<dataDirectory>/data/wallpapers/<uuid>.jpgand stores acustom:<uuid>reference in the user store.uploadWallpapertRPC mutation that accepts a base64-encoded JPEG (capped at ~10 MB decoded), validates the JPEG magic bytes, and delegates tosaveCustomWallpaper.GET /api/wallpapers/custom/:idto serve custom wallpaper files, placed before the static catch-all.Frontend (
ui)resolveWallpaperAssetshelper that transparently handles both built-in numeric IDs andcustom:<uuid>IDs, so every existing wallpaper lookup works without special-casing.WallpaperProvidercontext widened to carryuploadWallpaperand accept the broaderWallpaperBasetype.Security considerations
:idagainst a strict UUID v4 regex before constructing a file path. Invalid IDs receive a 400 response; no user input is ever interpolated into a path unchecked.FF D8 FF) on the decoded buffer. The frontend additionally re-encodes through<canvas>→toBlob('image/jpeg'), so the server only ever receives valid JPEG data.Out of scope
The following are intentionally left for follow-up work:
Testing checklist
.txtto.jpg) — rejected by magic-byte validationGET /api/wallpapers/custom/../../etc/passwd— returns 400