# IRPCClientScript.UploadScriptApplicationFileBlockEx

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) > [Client scripts and UI extension applications](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCClientScript/index.md)

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

Badges: `Vault API / standard` `write` `session` `idempotent`

Uploads an application package block by block and, with the last block, installs the
application.

- **Service:** [Client scripts and UI extension applications](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCClientScript/index.md) `MFiles.IRPCClientScript`
- **gRPC method:** `/MFiles.IRPCClientScript/UploadScriptApplicationFileBlockEx`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/upload-script-application-file-block-ex`
- **Request:** [`UploadScriptApplicationFileBlockExRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCClientScript/UploadScriptApplicationFileBlockEx/index.md#request)
- **Response:** [`UploadScriptApplicationFileBlockExResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCClientScript/UploadScriptApplicationFileBlockEx/index.md#response)
- **Book and level:** Vault API, standard
- **Kind:** write
- **Session:** Required: the session ID from LogIn in the mfiles-session-id-bin metadata.
- **Idempotent:** yes
- **Returns metadata structure version:** no
- **Streaming:** none (unary)

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

## Remarks

- Requires the vault right `change_metadata_structure`.
- First call: `upload_id` 0 and `offset` 0; it returns the new ID in `upload_idret`. Send the
  following blocks with that ID and their offsets, and set `ready` on the last block. The
  package may be at most 500 MB.
- With `ready` the server validates and installs the package. It is rejected if the same
  version is already installed ("Already exists."), if it is older than the installed version,
  if it is not a valid application package, or if it is an unsigned vault application and the
  server requires a valid signature from the caller.
- `outdated_vault_apps` lists the vault applications that this application depends on and whose
  installed version is lower than it requires.
- Uninstall with [RemoveScriptApplication](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCClientScript/RemoveScriptApplication/index.md).

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

## Request: UploadScriptApplicationFileBlockExRequest

> 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 |
|---|---|---|
| `upload_id` | `int32` | 0 in the first call; then the `upload_idret` it returned. |
| `total_size_in_bytes` | `int64` | The size of the whole package. |
| `offset` | `int64` | The position of this block. Use multiples of 4096 bytes for all blocks but the last. |
| `data` | `bytes` | The bytes of this block. |
| `ready` | `bool` | True on the last block, to install the uploaded package. |

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

## Response: UploadScriptApplicationFileBlockExResponse

> 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 |
|---|---|---|
| `upload_idret` | `int32` | The ID of the upload, for the next blocks. |
| `outdated_vault_apps[]` | repeated [`VaultApplicationDependency`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.VaultApplicationDependency/index.md) | After the last block, the dependencies whose installed version is too old. Empty otherwise. |
| `outdated_vault_apps[].guid` | `string` | The application identifier. |
| `outdated_vault_apps[].name` | `string` | The name of the required vault application. |
| `outdated_vault_apps[].version` | `string` | The minimum required application version. |
| `outdated_vault_apps[].required` | `bool` | True if the application is required to be at at least the minimum version. |

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

## Related methods

- [RemoveScriptApplication](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCClientScript/RemoveScriptApplication/index.md): Uninstalls an application from the vault.
- [UploadScriptApplicationFileBlock](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCClientScript/UploadScriptApplicationFileBlock/index.md): Uploads and installs an application package. Same as UploadScriptApplicationFileBlockEx without the list of outdated dependencies.
