# Register file resource

Register a server-accessible file for use by text analyzers.

SDK: `@zilliz/milvus2-sdk-node@3.0.10` · Tested with Milvus 3.0.6

Canonical documentation: https://milvus-io.github.io/milvus-sdk-node/rest-api/text-analysis/file-resources/add/

## Section links

- [cURL command](https://milvus-io.github.io/milvus-sdk-node/rest-api/text-analysis/file-resources/add/#curl-command)
- [Default request](https://milvus-io.github.io/milvus-sdk-node/rest-api/text-analysis/file-resources/add/#default-request)
- [Sample response](https://milvus-io.github.io/milvus-sdk-node/rest-api/text-analysis/file-resources/add/#sample-response)
- [Request fields](https://milvus-io.github.io/milvus-sdk-node/rest-api/text-analysis/file-resources/add/#request-fields)

`POST /v2/vectordb/file_resources/add`

Replace `https://your-cluster.example.com` with your Milvus endpoint. Set `MILVUS_TOKEN` for authentication or omit the Authorization header on an unauthenticated cluster.

## cURL command

```bash
curl --request POST --url 'https://your-cluster.example.com/v2/vectordb/file_resources/add' \
  --header 'Content-Type: application/json' \
  --header "Authorization: Bearer ${MILVUS_TOKEN}" \
  --data-raw '{
  "name": "dictionary",
  "path": "s3://example-bucket/analyzers/dictionary.txt"
}'
```

## Default request

```json
{
  "name": "dictionary",
  "path": "s3://example-bucket/analyzers/dictionary.txt"
}
```

## Sample response

```json
{
  "code": 0,
  "data": {}
}
```

## Request fields

- `name` string (required)
  Resource name.
- `path` string (required)
  Server-accessible location of the file resource.

See [`HttpClient.addFileResource`](https://milvus-io.github.io/milvus-sdk-node/api-reference/http-client/#addfileresource) for the Node.js SDK method.
