Upload screenshots
Upload player screenshots server-side with screenshot-basic to your team's media in TeamPanel and tag them with the player license.
Upload screenshots (FiveM)
Your FiveM server can upload player screenshots directly into your team's Media – e.g. for reports, anti-cheat hits, or support cases. With the license:… tag you can later find all screenshots of a player.
Requirements
- screenshot-basic installed and started on the server
- Your team ID (Media → API & Integrations tab)
- An API key – ideally a dedicated one with the
media:uploadscope, linked to a member who may upload media
Store the API key in server.cfg
set teampanel_api_key "TP_your_key"Never use setr
setr replicates the variable to all clients – every player could read the key. Always use set
so the key stays on the server.
Add the upload function (server script)
The server asks the client to take a screenshot (requestClientScreenshot) and uploads it itself via the JSON upload. This way the key never reaches the player.
-- server.lua
-- server.cfg: set teampanel_api_key "TP_…"
local TEAM_ID = '<teamId>'
local function uploadScreenshot(playerId)
exports['screenshot-basic']:requestClientScreenshot(playerId, { encoding = 'jpg', quality = 0.85 }, function(err, dataUrl)
if err then return print('Screenshot failed: ' .. tostring(err)) end
local tags = { 'type:screenshot' }
local license = GetPlayerIdentifierByType(playerId, 'license') -- e.g. "license:abc123…"
if license then table.insert(tags, license) end
PerformHttpRequest(('https://api.team-panel.com/v1/cdn/media/%s/upload'):format(TEAM_ID), function(status, body)
if status ~= 201 then return print(('Upload failed (%s): %s'):format(status, body)) end
print(json.decode(body).publicUrl)
end, 'POST', json.encode({
file = dataUrl,
fileName = ('screenshot-%s-%s.jpg'):format(playerId, os.time()),
folder = 'screenshots',
tags = tags,
}), {
['Content-Type'] = 'application/json',
['Authorization'] = 'Bearer ' .. GetConvar('teampanel_api_key', ''),
})
end)
end
-- Example: /screenshot <playerId> (restricted, requires ACE permission)
RegisterCommand('screenshot', function(_, args)
local target = tonumber(args[1])
if target and GetPlayerName(target) then uploadScreenshot(target) end
end, true)Check the result
After the upload, the screenshot is under Media in the screenshots folder (created automatically on the first upload). Filter by license:… to see all screenshots of a player.
Tips
- Clean up: Add a folder rule to the
screenshotsfolder, e.g. auto-delete after 30 days – this keeps your storage within the plan limit. - Store privately: Upload evidence with
public = falseor set the folder's default visibility to private. Then there is no public CDN link. - More tags: e.g.
type:report,discord:<id>, orsteam:<hex>– at most 20 per file, see Tags. - Notify: With the Media uploaded automation event you can post new screenshots to a Discord channel, for example.
No client uploads with your key
requestScreenshotUpload is a client export: the key would be sent from the game client and
be visible to players. For uploads with a team API key, always use the server-side approach above.
Phone scripts, other games & tools
The Media API works with any HTTP client – e.g. camera apps in phone scripts (relay through your server), Minecraft or Hytale plugins, Discord bots, or launchers. Examples with curl and Node.js plus all parameters are documented under Media API.
Planned: uploads with TeamPanelFX
Coming soon: TeamPanelFX will get built-in exports for uploads – no HTTP code of your own needed. The interface is not final yet and may change, for example:
exports.teampanelfx:uploadScreenshot(playerId, { folder = 'screenshots', tags = { 'type:report' } })