333e813. If you run a fork, check that it uses the same camera callback and reads a JSON url field before applying the example.
Prerequisites
- Set up FiveMesh CDN and install the FiveMesh SDK with an API key that has
cdn:write. - Start
screenshot-basicbeforefivemesh-sdk. Startqb-phoneafter both resources andqb-core. - If your API key has path restrictions, allow the
qb-phoneprefix.
Connect the camera
- In
qb-phone/config.lua, setConfig.Fivemerr = true. This upstream setting makes the camera use the server-side callback. - In
qb-phone/server.lua, find the existingqb-phone:server:UploadToFivemerrcallback. Replace the entire callback registration with the example below. Keep its name so the camera can still call it. - Save your changes and run
restart qb-phonein the FiveM server console.
Verify uploads
- Take a new photo in qb-phone and open it in the gallery.
- Check for the PNG under
qb-phonein the CDN object browser and open its public URL. - Take a second photo and confirm both entries still open.
cdn:write, and the key allows the destination path and image/png.