Repository navigation
feat(media): add FiveMesh CDN upload provider - #323
Merged
Github-Samuel merged 1 commit intoNov 11, 2026
Merged
Github-Samuel merged 1 commit into
Github-Samuel merged 1 commit into
Conversation
Support server uploads and optional scoped direct uploads for FiveMesh CDN.
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.
Add FiveMesh CDN as an upload provider
Summary
Adds FiveMesh CDN as a third media provider alongside Fivemanage and Qbox. FiveMesh uploads go through the game server by default. With
AllowDirectUpload = true, supported phone features can send media directly from the NUI to FiveMesh, reducing the upload traffic the game server has to relay.Each direct upload uses a short-lived token limited to one file, a dedicated path, a size limit, and allowed MIME types. The game server keeps the API key server-side and verifies the returned CDN URL and file signature before saving the media. Supported upload flows can fall back to the server route if direct upload fails.
Setup
Provider = 'fivemesh'inconfigs/photos.lua.FiveMeshPathdefaults tophone.cdn:writeaccess toFiveMeshCdninconfigs/server/apikeys.lua, or use the server-onlysd_fivemesh_cdn_keyconvar withset. If the key restricts paths, allowFiveMeshPath.AllowDirectUpload = trueto opt in to direct uploads.Type of Change
Related Issues
None.
Testing
Tested locally
Tested with latest sd-phone
Tested with latest ox_lib
Tested with latest ox_inventory
Multiplayer tested
Uploaded a photo and a video on a dev server in each FiveMesh upload mode.
Ran the NUI build, lint, tests, Knip, and i18n checks.
Ran local regression checks for FiveMesh token expiry, ownership, media validation, and fallback. Compared 25 Fivemanage presigned upload scenarios against the original implementation and checked Qbox provider routing and error handling with mocks.
Breaking Changes
None expected. Existing Fivemanage and Qbox configurations require no migration. FiveMesh requires explicit selection, and Fivemanage is the default.
Checklist