> For the complete documentation index, see [llms.txt](https://docs.hubyte.de/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hubyte.de/artikel-konfigurator/english-documentation/medienupload.md).

# Media upload

With the **Media upload** field type, the customer can upload a file on the product detail page – for example a logo to be printed, a template or a photo. The uploaded file is assigned to the line item and is available in the order.

<figure><img src="/files/2Gaz3FZvxeSrYAEqwJhl" alt=""><figcaption></figcaption></figure>

## Creating a "Media upload" field

1. Create a new field under **Own/Additional Fields**.
2. Select **Media upload** as the **field type**.
3. Configure the upload settings:

| Setting                   | Description                                                                                                      |
| ------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| **Allowed file formats**  | Selection of the permitted file formats. Only visible if the format restriction is enabled globally (see below). |
| **Max upload size in kB** | Limits the file size of the upload.                                                                              |

## Global settings for media upload

In the [plugin configuration](/artikel-konfigurator/english-documentation/plugin-konfiguration.md) you will find additional, globally valid options in the **Field type: Media upload** section:

| Setting                   | Key                   | Description                                                                                                            |
| ------------------------- | --------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| **Show preview image**    | `previewImage`        | Shows a preview image in the article after the upload.                                                                 |
| **Image width in px**     | `imageWidth`          | Width of the preview image during media upload (default: 50).                                                          |
| **Restrict file formats** | `fileTypeRestriction` | If active, the permitted file formats can be restricted per field. If the option is disabled, all formats are allowed. |

## Behavior in the frontend

The customer selects a file in the upload field. If the preview is enabled and it is an image, a preview image is shown in the configured width. When adding to the cart, the file is taken over and assigned to the line item.

> **Tip:** Restrict the permitted file formats and the maximum size sensibly to avoid faulty uploads and very large files. For print templates, `pdf`, `png` and `jpg` are common, for example.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hubyte.de/artikel-konfigurator/english-documentation/medienupload.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
