Skip to main content

Exports

Captures a screenshot and uploads it to cloud storage.
local result = exports.nocloud:TakeImage({
    category = 'screenshots',
    playerId = GetPlayerServerId(PlayerId())
})

if result then
    print('Screenshot uploaded:', result.url)
    print('Media ID:', result.id)
end
Parameters
  • metadata: table - Key-value pairs for custom metadata (optional)
Returns
  • url: string - Public URL of the uploaded image
  • id: string - Unique media ID for reference
Generates a pre-signed URL for client-side uploads.
local signedUrl = exports.nocloud:GenerateSignedUrl('image/png', 1024, {
    category = 'screenshots',
    owner = 'player123'
})
Parameters
  • mimeType: string - MIME type of the file (e.g., image/png)
  • size: number - File size in bytes
  • metadata: table - Key-value pairs for custom metadata (optional)
Returns
  • signedUrl: string - Pre-signed URL for uploading

Lua Library

For a cleaner API, include the client Lua library in your fxmanifest.lua:
client_script '@nocloud/lib/client.lua'
Usage
local result = Cloud.storage:take_image({ category = 'screenshots' })
if result then
    print('Uploaded:', result.url)
end