---
title: "Update File"
description: "Update file name and/or expiry by id."
canonical_url: "https://docs.vettero.com/build/workflows/blocks/file/update"
---
# Update File

> Update file name and/or expiry by id.

<block-meta block="Yes" channels="Any" folder="file" group="File" groupTo="/build/workflows/blocks/file" icon="i-lucide-pen" pipe="Value" scope="Any" tool="Yes" type="file.update">



</block-meta>

**Update File** changes a [workspace file](https://docs.vettero.com/data/files) **name** and, optionally, **expiry**. It does not replace the binary. To replace contents, use [Create File from URL](https://docs.vettero.com/build/workflows/blocks/file/create-from-url) with **Update file id**, or edit the file under **Data → Files**.

Leave **Update expiry** off to keep the current expiry. Turn it on to set a datetime, minutes from now, or clear expiry (empty **Expires at**).

## Configure

<table>
<thead>
  <tr>
    <th>
      Setting
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        File id
      </strong>
    </td>
    
    <td>
      Workspace file id (required)
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Name
      </strong>
    </td>
    
    <td>
      Optional display name
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Update expiry
      </strong>
    </td>
    
    <td>
      When on, change expiry
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Expiry mode
      </strong>
    </td>
    
    <td>
      Shown when updating expiry — <strong>
        Datetime
      </strong>
      
       or <strong>
        Minutes from now
      </strong>
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Expires at
      </strong>
    </td>
    
    <td>
      Shown for Datetime — ISO datetime; empty clears expiry
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Expires in (minutes)
      </strong>
    </td>
    
    <td>
      Shown for Minutes from now
    </td>
  </tr>
</tbody>
</table>

## Handles

<table>
<thead>
  <tr>
    <th>
      Handle
    </th>
    
    <th>
      Role
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        In
      </strong>
      
       (target)
    </td>
    
    <td>
      Incoming connection
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Out
      </strong>
      
       (source)
    </td>
    
    <td>
      Continues after the file is updated
    </td>
  </tr>
</tbody>
</table>

## Pipe schema

The next block reads this on the data pipe (`pipe.value`). The value is the updated file object (same shape as [Get File](https://docs.vettero.com/build/workflows/blocks/file/get)): `id`, `name`, `originalName`, `extension`, `type`, `mime`, `size`, `url`, `storage`, `expiresAt`, `createdAt`.

## Use case

- Rename a chat file. Copy or move it into the library if you need the id after the conversation is deleted.
- Set a short expiry on a generated export, or clear expiry instead of using [Persist File](https://docs.vettero.com/build/workflows/blocks/file/persist).

<block-page-nav>



</block-page-nav>


## Sitemap

See the full [sitemap](https://docs.vettero.com/sitemap.md) for all pages.
