# Upload a file through an upload link

> Source: https://elaichi.ai/docs/api-reference/files/file-upload/uploadfilevialink/

`PUT /file-upload/{id}`

Resource: **File Upload** · API: **Files**

## Path parameters

- **`id`** _(string, required)_
  The file id (`file_…`) the link reserved.

## Response body

- **`file_id`** _(string)_
- **`status`** _(string)_
  Allowed: `ready`
- **`filename`** _(string)_
- **`mime`** _(string)_
- **`size_bytes`** _(integer)_
- **`expires_at`** _(string)_

## Code examples

### curl

```bash
curl -X PUT 'https://api.elaichi.ai/file-upload/<id>' \
  -H 'Content-Type: application/json'
```

### JavaScript

```javascript
const response = await fetch('https://api.elaichi.ai/file-upload/<id>', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
console.log(data);
```

### Python

```python
import os
import requests

url = "https://api.elaichi.ai/file-upload/<id>"
headers = {
    "Content-Type": "application/json",
}

response = requests.put(url, headers=headers)
print(response.json())
```
