# IRPCFileTransfer.FileUploadEnd

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Vault API](https://developer.m-files.com/APIs/gRPC-API/vault/index.md) > [Stateless file upload sessions](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCFileTransfer/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCFileTransfer/FileUploadEnd/

Badges: `Vault API / standard` `write` `session or assertion`

Completes an upload in blocks. Binds the content to no object; use FileUploadAttach or
AddObjectWithFiles for that.

- **Service:** [Stateless file upload sessions](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCFileTransfer/index.md) `MFiles.IRPCFileTransfer`
- **gRPC method:** `/MFiles.IRPCFileTransfer/FileUploadEnd`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/file-upload-end`
- **Request:** [`FileUploadEndRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCFileTransfer/FileUploadEnd/index.md#request)
- **Response:** [`FileUploadEndResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCFileTransfer/FileUploadEnd/index.md#response)
- **Book and level:** Vault API, standard
- **Kind:** write
- **Session:** Required: a session (mfiles-session-id-bin metadata) or a session assertion (x-mf-session-assertion metadata).
- **Idempotent:** no
- **Returns metadata structure version:** no
- **Streaming:** none (unary)

<a id="remarks"></a>

## Remarks

`block_count` must match the uploaded blocks 0..`block_count`-1 ("The block count does not match
the uploaded blocks." otherwise), and the content must have the `total_size_in_bytes` given to
`FileUploadBegin`, if any ("File size mismatch.").

<a id="request"></a>

## Request: FileUploadEndRequest

> Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

| Field | Type | Description |
|---|---|---|
| `file_ref` | `string` | The `file_ref` from `FileUploadBegin`. |
| `block_count` | `int64` | The number of uploaded blocks, at most 50,000. The blocks are indexes 0 to `block_count`-1. |

<a id="response"></a>

## Response: FileUploadEndResponse

No fields.

<a id="related"></a>

## Related methods

- [FileUploadBegin](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCFileTransfer/FileUploadBegin/index.md): Begins an upload in blocks and returns its `file_ref` and the block rules.
