# Upload System Install

## **Media Service Configuration**

This section explains how to set up the media upload service for the bodycam system. You can choose between **FiveManage**, **FiveMerr**, or **Discord** as your upload destination.

***

### **📌 Supported Services**

| Service                 | Description                             |
| ----------------------- | --------------------------------------- |
| **FiveManage (fm)**     | Cloud-based video hosting               |
| **FiveMerr (fivemerr)** | Alternative cloud hosting platform      |
| **Discord (discord)**   | Upload via Discord webhook (25MB limit) |

***

### **🛠️ Step 1 — Select Your Media Service**

Open your `config.lua` file and set the service you want to use:

```lua
Config.MediaService = 'fm'
-- Available: 'fm', 'fivemerr', 'discord'
```

***

### **🧷 Step 2 — Configure Service Credentials**

Replace the placeholder values with your own API keys or Webhook URL.

***

#### **➤ FiveManage Configuration**

```lua
fm = {
    apiUrl = 'https://fmapi.net/api/v2/video',
    apiKey = 'YOUR_API_KEY_HERE',  -- Obtain from your FiveManage dashboard
    headers = { 'Authorization' }
}
```

***

#### **➤ FiveMerr Configuration**

```lua
fivemerr = {
    apiUrl = 'https://api.fivemerr.com/v1/media/videos',
    apiKey = 'YOUR_API_KEY_HERE',  -- Get from the FiveMerr dashboard
    headers = { 'Authorization' }
}
```

***

#### **➤ Discord Webhook Configuration**

```lua
discord = {
    webhookUrl = 'YOUR_WEBHOOK_URL_HERE',  -- Create a webhook from your Discord server settings
    maxFileSize = 25 * 1024 * 1024,        -- 25MB file limit
    username = 'Bodycam System',
    avatarUrl = nil
}
```

***

### **🔄 Step 3 — Restart Resources**

After updating your configuration, restart the following resources:

```
frkn-bodycam
frkn-bodycam-render
```

Your bodycam system will now upload media using the selected service.
