> For the complete documentation index, see [llms.txt](https://docs.redivis.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.redivis.com/api/client-libraries/redivis-js/reference/upload/upload.create.md).

# Upload.create

### Upload.<mark style="color:purple;">create</mark>(*\[content, options]*) → `Promise<Upload>`

Uploads data to the table, and (by default) waits for it to be imported. Uploads larger than 8MB are uploaded resumably, and automatically resume if interrupted.

```javascript
await table.upload('data.csv').create(file, { skipBadRecords: true });
```

**Parameters:**

**`content`** : *optional*\
The data to upload. One of:

* a [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) or [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File)
* an `ArrayBuffer` or typed array (e.g., a `Uint8Array`, or a Node.js `Buffer`)
* a [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream) of bytes, in which case the `size` option is required
* a file path (Node.js only)
* tabular data — an array of row objects, or an arrow Table — which is uploaded as newline-delimited JSON

Omit the content when importing data with `transferSpecification`, or when creating a `stream` upload.

**`type`** : *string, optional*\
The type of the file, e.g. `delimited`, `ndjson`, `parquet`, `avro`, `orc`, `xls`, `xlsx`, `dta`, `sas7bdat`, `sav`, or `stream`. Inferred from the upload's name if not provided.

**`size`** : *number, optional*\
The size of the content, in bytes. Required when the content is a `ReadableStream`.

**`transferSpecification`** : *object, optional*\
Import the data from another source, rather than uploading content: `{ sourceType, sourcePath, identity }`, where `sourceType` is one of `url`, `gcs`, `s3`, `bigQuery`, or `redivis`. See [Uploading data](https://docs.redivis.com/api/client-libraries/redivis-js/examples/uploading-data.md#upload-data-from-an-external-source).

**`schema`** : *object\[], optional*\
For `stream` uploads, the upload's variables, as `[{ name, type }]`. If not provided, the schema is inferred from the first rows inserted.

**`metadata`** : *object, optional*\
Metadata for the upload's variables, keyed by variable name, as `{ [name]: { label, description, valueLabels } }`.

**`hasHeaderRow`** : *boolean, default `true`*\
Whether the first row of a delimited or Excel file is a header.

**`skipBadRecords`** : *boolean, default `false`*\
Whether to skip rows that can't be parsed, rather than failing the upload.

**`delimiter`**, **`quoteCharacter`**, **`escapeCharacter`** : *string, optional*\
For delimited files. The delimiter is inferred if not provided.

**`hasQuotedNewlines`** : *boolean, optional*\
For delimited files, whether cells may contain newlines (within quotes). Setting this to `true` will substantially reduce ingest performance.

**`allowJaggedRows`** : *boolean, default `false`*\
For delimited files, whether to allow rows with fewer columns than the header.

**`nullMarkers`** : *string\[], optional*\
Values that represent nulls (e.g., `['NA', '.']`).

**`ifNotExists`** : *boolean, default `false`*\
If an upload with this name already exists on this version of the table, return it rather than throwing.

**`replaceOnConflict`** : *boolean, default `false`*\
If an upload with this name already exists, delete it and create this one in its place.

**`renameOnConflict`** : *boolean, default `false`*\
If an upload with this name already exists, create this one with a new name.

**`waitForFinish`** : *boolean, default `true`*\
Whether to wait for the data to be imported.

**`raiseOnFail`** : *boolean, default `true`*\
Whether to throw a [`JobError`](https://docs.redivis.com/api/client-libraries/redivis-js/reference/redivis/redivis.errors.md) if the import fails.

**`removeOnFail`** : *boolean, default `false`*\
Whether to delete the upload if the import fails.

**`onProgress`** : *function, optional*\
Called with `{ bytesUploaded, totalBytes }` as the content is uploaded.

**`signal`** : *AbortSignal, optional*

**Returns:** `Promise<Upload>`, this upload.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.redivis.com/api/client-libraries/redivis-js/reference/upload/upload.create.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
