> ## Documentation Index
> Fetch the complete documentation index at: https://docs.revoengine.com/llms.txt
> Use this file to discover all available pages before exploring further.

# storage.finalizeUploadSession()

> Public low-code contract, signatures and examples for storage.finalizeUploadSession.

## `storage.finalizeUploadSession()`

Finalizes a chunked or incremental upload session and materializes the
Storage entry. Managed direct uploads finalize automatically and should be
observed with `getUploadSession()` instead of calling this method.

Notes:

* Unavailable with `readOnly: true` (throws an error).

### Overloads

```ts theme={null}
static finalizeUploadSession(
      storageUploadSessionId: string,
      data?: StorageUploadSessionFinalizeInput,
    ): Promise<{ session: StorageUploadSession; entry: StorageEntryView; fileStats?: StorageFileStats }>;

static finalizeUploadSession(
      namespace: string,
      storageUploadSessionId: string,
      data?: StorageUploadSessionFinalizeInput,
    ): Promise<{ session: StorageUploadSession; entry: StorageEntryView; fileStats?: StorageFileStats }>;
```

### Example

```ts theme={null}
const result = await storage.finalizeUploadSession(storageUploadSessionId);
```

See [all storage methods](https://docs.revoengine.com/low-code/reference/storage.md) or [runtime basics](https://docs.revoengine.com/low-code/overview.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.