> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nonefivem.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Client Exports

> Client-side exports for capturing and uploading screenshots

## Exports

<Accordion title="TakeImage">
  Captures a screenshot and uploads it to cloud storage.

  ```lua theme={null}
  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
</Accordion>

<Accordion title="GenerateSignedUrl">
  Generates a pre-signed URL for client-side uploads.

  ```lua theme={null}
  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
</Accordion>

## Lua Library

For a cleaner API, include the client Lua library in your `fxmanifest.lua`:

```lua theme={null}
client_script '@nocloud/lib/client.lua'
```

**Usage**

```lua theme={null}
local result = Cloud.storage:take_image({ category = 'screenshots' })
if result then
    print('Uploaded:', result.url)
end
```
