> For the complete documentation index, see [llms.txt](https://design.mirakl.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://design.mirakl.com/design/components/actions/file-download.md).

# File download

This component allows users to download a file from Mirakl.

<figure><img src="https://1297765105-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMoZPkWOmnKvoMWGW4aeM%2Fuploads%2FdhMHuSJYkrgtBlOEjPFk%2FFile%20Download%20Hero.png?alt=media&amp;token=11fc0bbb-00b1-4ca7-9c88-1384f860b619" alt=""><figcaption></figcaption></figure>

## Overview

{% hint style="info" %}
This component allows users to **download** a file from the platform, not upload one.

To upload any document into the platform, refer to [`Upload Button`](/design/components/actions/buttons.md#upload-button) a dedicated component to be used in a form.
{% endhint %}

This component has two mandatory fields:

* File name (specifying the file type). \
  If the file name is too long to fit into the given space, we automatically include an ellipsis but always display the file format.
* File icon

This component has a optional fields:

* File size\
  Specifying the file size is better because it provides users a useful information, aiding transparency from our side, download speed estimation, and data storage needed.

<figure><img src="https://1297765105-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMoZPkWOmnKvoMWGW4aeM%2Fuploads%2F4CnI5mvzD7i9fif7n909%2FFile%20Download%20Examples.png?alt=media&amp;token=41ed191b-e5ff-4cb7-851a-db7930611ea2" alt=""><figcaption></figcaption></figure>

Each component can contain only one file. \
If multiple files are available for download, you must overstack the component

<figure><img src="https://1297765105-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMoZPkWOmnKvoMWGW4aeM%2Fuploads%2FCrHlVmEIuv2MQHdUrGOZ%2FFile%20Download%20Multiple.png?alt=media&amp;token=34c443e3-fd0f-4cef-9829-b4fb765869bc" alt=""><figcaption></figcaption></figure>

## Key takeaways <a href="#id-8864e6" id="id-8864e6"></a>

{% hint style="success" %}

* Include file size if possible
* Use one component per file
  {% endhint %}

{% hint style="danger" %}

* Change the wording of the action (no "Download here")
  {% endhint %}


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://design.mirakl.com/design/components/actions/file-download.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
