# file-uploader

> Uploads files to Shopify and adds their names, gids and admin links to the cart line.

Status: Ready (Smootify 2.0)  
Plan: Server plan  
Add-on: Product File Upload  
URL: https://www.smootify.io/docs/astro/reference/elements/file-uploader  
Updated: 2026-10-21

## Where it can go

- **Inside any of:** [`smootify-add-to-cart`](https://www.smootify.io/docs/astro/reference/elements/smootify-add-to-cart), [`dynamic-property`](https://www.smootify.io/docs/astro/reference/elements/dynamic-property).
- **Out of place,** it stays in the page and does nothing: not checked: uploads, but no cart line gets the fields.

## What it requires

- The **server plan**: on other plans Smootify removes the element from the page.
- The **Product File Upload** extension (server plan, the extension activated in the Smootify dashboard, the licensed domain). Without it, the element does nothing.

## Fields in the form

Each field’s `name` attribute tells Smootify what the field holds.

| 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`, `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/astro/reference/attributes/upload) | `upload` | 10 |
