---
title: "Get File"
description: "Get a workspace file by id."
canonical_url: "https://docs.vettero.com/build/workflows/blocks/file/get"
---
# Get File

> Get a workspace file by id.

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



</block-meta>

**Get File** loads a [workspace file](https://docs.vettero.com/data/files) by id. The record on the pipe includes name, MIME type, size, public URL, storage bucket, and expiry.

Copy the id from **Data → Files** (**Copy Id**) or from an earlier upload, table field, or [Create File from URL](https://docs.vettero.com/build/workflows/blocks/file/create-from-url) step.

## 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; literal or variable)
    </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 loaded
    </td>
  </tr>
</tbody>
</table>

## Pipe schema

The next block reads this on the data pipe (`pipe.value`). The value is a file object:

<table>
<thead>
  <tr>
    <th>
      Key
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        id
      </code>
    </td>
    
    <td>
      text
    </td>
    
    <td>
      File id
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        name
      </code>
    </td>
    
    <td>
      text
    </td>
    
    <td>
      Display name
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        originalName
      </code>
    </td>
    
    <td>
      text
    </td>
    
    <td>
      Original filename when stored
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        extension
      </code>
    </td>
    
    <td>
      text
    </td>
    
    <td>
      File extension
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        type
      </code>
    </td>
    
    <td>
      text
    </td>
    
    <td>
      Generic type (image, video, PDF, and so on)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        mime
      </code>
    </td>
    
    <td>
      text
    </td>
    
    <td>
      MIME type
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        size
      </code>
    </td>
    
    <td>
      number
    </td>
    
    <td>
      Size in bytes
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        url
      </code>
    </td>
    
    <td>
      text
    </td>
    
    <td>
      Public URL
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        storage
      </code>
    </td>
    
    <td>
      text
    </td>
    
    <td>
      Storage bucket
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        expiresAt
      </code>
    </td>
    
    <td>
      text
    </td>
    
    <td>
      Expiry datetime, or null if none
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        createdAt
      </code>
    </td>
    
    <td>
      text
    </td>
    
    <td>
      Created datetime when set
    </td>
  </tr>
</tbody>
</table>

## Use case

- Load a file uploaded in chat, then send it with [File](https://docs.vettero.com/build/workflows/blocks/out/file) output or ingest it with [Add Datasource](https://docs.vettero.com/build/workflows/blocks/kb/add-datasource).
- Read `url` for an [API](https://docs.vettero.com/build/workflows/blocks/utility/api) call that needs a public link.

<block-page-nav>



</block-page-nav>


## Sitemap

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