# Media Upload in Media Folder

**URL:** <https://forum.shopware.com/t/media-upload-in-media-folder/92170>\
**Category:** Shopware 6 (German)\
**Created:** [2. Januar 2022 um 18:17 UTC](https://forum.shopware.com/t/media-upload-in-media-folder/92170 "2022-01-02T18:17:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nico2](https://avatars.discourse-cdn.com/v4/letter/n/838e76/32.png) [@Nico2](https://forum.shopware.com/u/Nico2)\
**Post date:** [2. Januar 2022 um 18:17 UTC](https://forum.shopware.com/t/media-upload-in-media-folder/92170/1 "2022-01-02T18:17:33Z")

</div>

Hi,  
ich lade über [https://shopware.stoplight.io/docs/admin-api/ZG9jOjEyNjI1Mzkw-media-handlingundefined#upload-the-resource-directly](https://shopware.stoplight.io/docs/admin-api/ZG9jOjEyNjI1Mzkw-media-handlingundefined#upload-the-resource-directly)

Bilder zu Artikeln noch. Die landen aber im Root Verzeichnis. Hat jemand ne Idee was ich angeben muss, damit die im product-media Folder landen?  
Im Bild sieht man den Bagger, welcher im Root liegt statt in dem Unterordner.

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/2X/c/c05b8fce05b436a6ad2f2095f1370775eb91c838.png)

---

<div class="post-metadata">

**Author:** ![j\_kunert](https://avatars.discourse-cdn.com/v4/letter/j/8dc957/32.png) [@j\_kunert](https://forum.shopware.com/u/j_kunert)\
**Post date:** [3. Januar 2022 um 07:44 UTC](https://forum.shopware.com/t/media-upload-in-media-folder/92170/2 "2022-01-03T07:44:17Z")

</div>

Hi  
du musst di ID vom Product Media Ordner angeben. wird oben in der URL angezeigt wenn du einmal auf den Ordner klickst. Ist eine lange Zahlenkombi.

Gruss

---

<div class="post-metadata">

**Author:** ![Nico2](https://avatars.discourse-cdn.com/v4/letter/n/838e76/32.png) [@Nico2](https://forum.shopware.com/u/Nico2)\
**Post date:** [3. Januar 2022 um 08:40 UTC](https://forum.shopware.com/t/media-upload-in-media-folder/92170/3 "2022-01-03T08:40:48Z")

</div>

Ah ok danke und wo oder wie übergebe ich die OrdnerID?

---

<div class="post-metadata">

**Author:** ![j\_kunert](https://avatars.discourse-cdn.com/v4/letter/j/8dc957/32.png) [@j\_kunert](https://forum.shopware.com/u/j_kunert)\
**Post date:** [3. Januar 2022 um 15:31 UTC](https://forum.shopware.com/t/media-upload-in-media-folder/92170/4 "2022-01-03T15:31:53Z")

</div>

API kenne ich leider nicht. Ich mache es über Open Office.

> **[Shopware 6 - Einstellungen - Import/Export](https://docs.shopware.com/de/shopware6-de/einstellungen/importexport?category=shopware-6-de%2Feinstellungen%2Fshop#import-von-medien)**
>
> Du kannst Deine Inhalte in Shopware 6 auf sehr einfachem Weg über Importe pflegen. Exporte kannst Du nutzen, um Deine vorhandenen Inhalte auszulesen oder an Schnittstellen und Auswertungstools zu übermitteln. In dieser Dokumentation beschreiben wir...

---

<div class="post-metadata">

**Author:** ![Phillinger](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/phillinger/32/19486_2.png) [@Phillinger](https://forum.shopware.com/u/Phillinger)\
**Post date:** [11. Januar 2023 um 13:13 UTC](https://forum.shopware.com/t/media-upload-in-media-folder/92170/5 "2023-01-11T13:13:09Z")

</div>

Okay, ist jetzt ein Jahr her, aber da ich gerade genau dieses Problem für mich löste und ich mich an diesen Thread bei meiner Recherche erinnerte, hier meine Lösung.

Du kannst die `mediaFolderId` in dem `media`-Objekt übermitteln, wenn du in Schritt 1 das media entity erstellst. Das erweiterte Beispiel aus [deinem o.g. Link zur Dokumentation](https://shopware.stoplight.io/docs/admin-api/ZG9jOjEyNjI1Mzkw-media-handling):

```auto
{
  "media": [
    {
      "id": "0fa91ce3e96a4bc2be4bd9ce752c3425",
      "media": {
        "id": "cfbd5018d38d41d8adca10d94fc8bdf0",
        "mediaFolderId": "f24ae21a52ed4cd2b372e6d745949af7"
      }
    }
  ]
}

```

---

<div class="post-metadata">

**Author:** ![Nico2](https://avatars.discourse-cdn.com/v4/letter/n/838e76/32.png) [@Nico2](https://forum.shopware.com/u/Nico2)\
**Post date:** [23. April 2024 um 18:13 UTC](https://forum.shopware.com/t/media-upload-in-media-folder/92170/6 "2024-04-23T18:13:18Z")

</div>

danke, du hilfst anderen Suchenden bestimmt weiter die das selbe Problem haben 🙂
