# IRPCClientScript.UploadScriptApplicationFileBlock

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/UploadScriptApplicationFileBlock/

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

Uploads and installs an application package. Same as UploadScriptApplicationFileBlockEx
without the list of outdated dependencies.

- **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/UploadScriptApplicationFileBlock`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/upload-script-application-file-block`
- **Request:** [`UploadScriptApplicationFileBlockRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCClientScript/UploadScriptApplicationFileBlock/index.md#request)
- **Response:** [`UploadScriptApplicationFileBlockResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCClientScript/UploadScriptApplicationFileBlock/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`.
- See [UploadScriptApplicationFileBlockEx](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCClientScript/UploadScriptApplicationFileBlockEx/index.md),
  which new code should use.

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

## Request: UploadScriptApplicationFileBlockRequest

> 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 total size of the file in bytes. |
| `offset` | `int64` | Starting position. NOTE: Always use multiples of 4096 bytes. |
| `data` | `bytes` | The file block to append. |
| `ready` | `bool` | True on the last block, to install the uploaded package. |

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

## Response: UploadScriptApplicationFileBlockResponse

> 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. |

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

## Related methods

- [UploadScriptApplicationFileBlockEx](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCClientScript/UploadScriptApplicationFileBlockEx/index.md): Uploads an application package block by block and, with the last block, installs the application.
