# Streaming file upload (IRPCFileTransferStreaming)

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)

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

File transfer methods that stream the file data.

These methods can't be defined in the IDL, as the IDL based services support only unary methods.

- **gRPC service:** `MFiles.IRPCFileTransferStreaming`
- **Book and level:** [Vault API](https://developer.m-files.com/APIs/gRPC-API/vault/index.md), standard
- **Methods:** 2
- **Proto file:** [`mfiles/IRPCFileTransferStreaming.proto`](https://developer.m-files.com/APIs/gRPC-API/downloads/proto/mfiles/IRPCFileTransferStreaming.proto)

<a id="overview"></a>

## Overview

The two methods that stream file data to the server. They belong to the `file_ref` uploads of
[IRPCFileTransfer](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCFileTransfer/index.md); read its overview first. Like that service,
they work only when [ServerVaultCapabilities](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ServerVaultCapabilities/index.md)
`file_upload_stateless_supported` is true; otherwise the call fails with "Not implemented.".
Stateless uploads are switched off by default in M-Files Server 26.11; upload with
[UploadTempFile](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/UploadTempFile/index.md) and
[UploadTempFileCommit](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/UploadTempFileCommit/index.md) there.

Both methods take a stream of request messages: one `header`, then the data as any number of
`file_data` chunks of a few megabytes at most, then one `end`. The server sends one response when
the stream is complete.

<a id="methods"></a>

## Methods

| Method | Summary | Facts |
|---|---|---|
| [FileUploadBlock](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCFileTransferStreaming/FileUploadBlock/index.md) | Uploads one block of a stateless file upload by streaming its data. | `write` `session or assertion` `client streaming` |
| [FileUploadWhole](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCFileTransferStreaming/FileUploadWhole/index.md) | Uploads a whole file by streaming its content. | `write` `session or assertion` `client streaming` |
