# file-input

> Uploads files to Shopify and submits their gids as one form field. The saved files of its value show their file name, and their image when data-preview is set or (2.0) the designed item template has an [upload="preview"].

Status: Ready (Smootify 2.0)  
Plan: Server plan  
URL: https://www.smootify.io/docs/reference/elements/file-input  
Updated: 2026-10-13

## Where it can go

- **Inside any of:** [`metaobject-creator`](https://www.smootify.io/docs/reference/elements/metaobject-creator), [`customer-metafields-editor`](https://www.smootify.io/docs/reference/elements/customer-metafields-editor), [`smootify-cart`](https://www.smootify.io/docs/reference/elements/smootify-cart).
- **Out of place,** it stays in the page and does nothing: not checked: the gid field reaches no Smootify form.

## What it requires

- The **server plan**: on other plans Smootify removes the element from the page.

## Fields in the form

Each field’s **Name** setting in Webflow tells Smootify what the field holds. It is a setting of the field, not a custom attribute.

| Name | Field | What it does |
|---|---|---|
| the element’s `name`, else its `input[type="file"]`’s | file | The field the uploaded files are sent under; the file input itself loses its name. |

## Attributes on the element

- **It reads** `name`, `value`, `data-multiple`, `data-required`, `data-preview`, `data-only-images`, `min-file-size`, `max-file-size`, `min-resolution`, `data-error-<code>`.

## Attributes inside it

| Group | Attribute name | Values |
|---|---|---|
| [File upload](https://www.smootify.io/docs/reference/attributes/upload) | `upload` | 10 |
