---
title: "Upload a file to a specific dataset"
method: POST
path: "/uploadToDataset/{id}"
tags: ["files", "datasets"]
---

# Upload a file to a specific dataset

`POST /uploadToDataset/{id}`

Uploads the file, then links it with the dataset. Returns file id as
JSON object, or ids with filenames if multiple files are sent. ID can be
used to work on the file using the API. Uploaded file can be an XML
metadata file to be added to the dataset. If the optional Boolean
parameter extract is set to false, it does not send the file for
extraction. By default, Boolean parameter extract is set to true.

## Path parameters

- `id` string, required

## Query parameters

- `showPreviews` string
- `originalZipFile` string
- `flags` string
- `extract` boolean
- `folder_id` string

## Response `200`

OK

## Other responses

- `404` — The requested resource was not found

---

[API](https://skmtc.net/clowder-framework/apis/clowder.md) · [All operations](https://skmtc.net/clowder-framework/apis/clowder/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/clowder-framework/clowder/versions/bcd187478e0d/schema)
