Prerequisites
Before you begin, confirm:- FiveMesh CDN is set up for the active workspace.
- You have a service key with CDN write access.
- The service key is scoped to the path prefixes the script should manage.
- You can edit the LB-Phone or LB-Tablet server files.
LB-Phone configuration
To use presigned uploads with LB-Phone, update the server and upload configuration.1
Configure server credentials
Open
lb-phone/server/apiKeys.lua and configure the API keys and target path prefixes.2
Request a presigned upload URL
Update
lb-phone/server/custom/functions/functions.lua to implement GetPresignedUrl.3
Use presigned URLs in upload settings
In
lb-phone/shared/upload.lua, set url to "PRESIGNED_URL" for custom methods.4
Return the custom method
Confirm
CustomGetUploadMethod exists in lb-phone/client/custom/functions/functions.lua.LB-Tablet configuration
LB-Tablet uses the same presigned upload pattern.1
Configure server credentials
Open
lb-tablet/server/apiKeys.lua and add the same API_KEYS and UPLOAD_PATHS values.2
Request a presigned upload URL
Update
lb-tablet/server/custom/functions/functions.lua with the same
GetPresignedUrl function used for LB-Phone.3
Use presigned URLs in upload settings
In
lb-tablet/config/upload.lua, set url = "PRESIGNED_URL" for each custom
media type.4
Return the custom method
Confirm
CustomGetUploadMethod is implemented in lb-tablet/client/custom/functions/functions.lua.