> For the complete documentation index, see [llms.txt](https://docs.struct.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.struct.com/tutorials/guides/how-to-use-import/how-to-import-with-media.md).

# How to import with media

## Before importing

A prerequisite when importing media is having a zip-file with all of the mediafiles you wish to import. The zip-file must only contain the media files. No folders or subfolders.

Additionally you must have an excel spreadsheet with information as though you would normally import

<figure><img src="/files/FWWOkoTvCS5r1EopDyDU" alt=""><figcaption><p>Excel spreadsheet with headers and data</p></figcaption></figure>

Importantly you must have a column with the name of the media attribute as header and filenames that correspond to the files in your zip-file, including their file extension, e.g. pdf.

## Starting the import

To start importing you choose the excel spreadsheet with the data you want to import, in this tutorial the spreadsheet is called "import\_with\_media.xlsx".

Next you need to choose the correct Import type. Choose the one that fits what you need to import. In this tutorial we are importing to a list so we choose 'List property import'.

To include media toggle the 'Upload assets' option. This reveals a new selectize, 'Select zip file'. Clicking the 'Select zip file'-selectize will open a file explorer and allow you to choose your zip-file.

<figure><img src="/files/AREYI4TCLXu7QHzAwxqk" alt=""><figcaption><p>Import page</p></figcaption></figure>

Having chosen the files you want to import, click 'Start upload' to continue.

## Mapping your data

Mapping data works the same way as it does without media.

If you are uncertain on how to do this you can follow read more about this in earlier import-tutorials:

Mapping with General excel import: [How to import products](/tutorials/guides/how-to-use-import/how-to-import-products.md)\
Mapping with List property import: [How to import data into a list property on entities](/tutorials/guides/how-to-use-import/how-to-import-list-data-using-list-property-import.md)

<figure><img src="/files/aMqUFXWuBui4wSo6Vg77" alt=""><figcaption><p>Data mapping</p></figcaption></figure>

One difference however is that this is where you will choose the folder to upload your media to. This is done by selecting the folder in the list under 'Select upload folder'.

{% hint style="warning" %}
**Note** Be aware that 'Select upload folder' will not be visible until an asset reference attribute has been chosen to be mapped to.
{% endhint %}

## Approve changes

When approving data you should be able to see the media files being attached to your entity.

<figure><img src="/files/SQh3U333KlrVCXqh6bNa" alt=""><figcaption></figcaption></figure>

If you are happy with the changes, click 'Commit import' to finalize the import.


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.struct.com/tutorials/guides/how-to-use-import/how-to-import-with-media.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
