**Source URL:** https://limited.veevavault.dev/regulatory/vault-api/api-reference/23.3/file-staging/resumable-upload-sessions/upload-to-a-session.md

# Upload to a Session



The session owner can upload parts of a file to an active upload session. By default, you can upload up to 2000 parts per upload session, and each part can be up to 50MB.  Use the `Range` header to specify the range of bytes for each upload, or split files into parts and add each part as a separate file. Each part must be the same size, except for the last part in the upload session.

<Endpoint path="/api/{version}/services/file_staging/upload/{upload_session_id}" method="PUT"></Endpoint>

## Headers {#headers}

<FieldTable>
| Name | Description |
| --- | --- |
| `Accept` | `application/json` (default) or `application/xml` |
| `Content-Type` | `application/octet-stream` |
| `Content-Length` | The size of the file part in bytes. Parts must be at least 5MB in size, except for the last part uploaded in a session. |
| `Content-MD5` | Optional: The MD5 checksum of the file part being uploaded. |
| `X-VaultAPI-FilePartNumber` | The part number, which uniquely identifies a file part and defines its position within the file as a whole. If a part is uploaded using a part number that has already been used, Vault overwrites the previously uploaded file part. You must upload parts in numerical order. For example, you cannot upload part 3 without first uploading parts 1 and 2. |
</FieldTable>

## URI Path Parameters {#uri-path-parameters}

<FieldTable>
| Name | Description |
| --- | --- |
| `upload_session_id` | The upload session ID. |
</FieldTable>

## Request {#request}

<CodeExample title="">
```
curl -L -X PUT -H "Authorization: {SESSION_ID}" \
-H "Accept: application/json" \
-H "Content-Type: application/octet-stream" \
-H "Content-Length: 5242880" \
-H "X-VaultAPI-FilePartNumber: 2" \
--data-binary "@/chunk-ab." \
https://myvault.veevavault.com/api/v20.3/services/file_staging/upload/.lqX6rv1jbu5vABJoy5XoSZmQXTTJV_jwxO.kFuS.qISxQJDiFm0s_kfb8oRS9DBDGg--

```
</CodeExample>

## Response {#response}

<CodeExample title="">
```
{
   "responseStatus": "SUCCESS",
   "data": {
       "size": 5242880,
       "part_number": 2,
       "part_content_md5": "d6762077325b9ec3b75ada3b269e17d3"
   }
}

```
</CodeExample>

## Response Details {#response-details}

Upon SUCCESS, the response includes the `size`, `part_number`, and `part_content_MD5` for the file part.



---

**Previous:** [Create Resumable Upload Session](/regulatory/vault-api/api-reference/23.3/file-staging/resumable-upload-sessions/create-resumable-upload-session)  
**Next:** [Commit Upload Session](/regulatory/vault-api/api-reference/23.3/file-staging/resumable-upload-sessions/commit-upload-session)