# media-API Filtern auf Filename

**URL:** <https://forum.shopware.com/t/media-api-filtern-auf-filename/68058>\
**Category:** Programmierung\
**Created:** [1. Juli 2020 um 13:26 UTC](https://forum.shopware.com/t/media-api-filtern-auf-filename/68058 "2020-07-01T13:26:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ThomasChr](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/thomaschr/32/10466_2.png) [@ThomasChr](https://forum.shopware.com/u/ThomasChr)\
**Post date:** [1. Juli 2020 um 13:26 UTC](https://forum.shopware.com/t/media-api-filtern-auf-filename/68058/1 "2020-07-01T13:26:18Z")

</div>

Hallo zusammen,

weiß jemand warum dieser Aufruf:

> url + ‚/api/v1/media?filter[„fileName“]=ente‘

Mir diese Antwort gibt:

> {  
> &nbsp;&nbsp; &nbsp;‚errors‘: [{  
> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;‚code‘: ‚FRAMEWORK\_\_UNMAPPED\_FIELD‘,  
> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;‚title‘: ‚BadRequest‘,  
> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;‚detail‘: ‚Field"„fileName“"inentity"media"wasnotfound.‘,  
> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;‚status‘: ‚400‘,  
> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;‚meta‘: {  
> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;‚parameters‘: {  
> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;‚field‘: ‚„fileName“‘,  
> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;‚entity‘: ‚media‘  
> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;}  
> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;}  
> &nbsp;&nbsp; &nbsp;}]}

Wenn ich ohne die Filterbedingung arbeite bekomme ich diese Daten doch, vorallem das Feld „fileName“…

Bin so langsam am verzweifeln. Ich kann doch nicht nur um zu sehen ob schon eine Datei mit dem Namen existiert alle Media-Einträge durchsuchen…

Thomas

---

<div class="post-metadata">

**Author:** ![Krispin](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/krispin/32/12849_2.png) [@Krispin](https://forum.shopware.com/u/Krispin)\
**Post date:** [2. Juli 2020 um 05:42 UTC](https://forum.shopware.com/t/media-api-filtern-auf-filename/68058/2 "2020-07-02T05:42:57Z")

</div>

Hi Thomas,

versuche es mal bitte ohne die Quotes / Hochkommatas, dann sollte es wie gewünscht funktionieren.  
Also fileName anstatt „fileName“.

Gruß

Krispin

---

<div class="post-metadata">

**Author:** ![ThomasChr](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/thomaschr/32/10466_2.png) [@ThomasChr](https://forum.shopware.com/u/ThomasChr)\
**Post date:** [2. Juli 2020 um 06:06 UTC](https://forum.shopware.com/t/media-api-filtern-auf-filename/68058/3 "2020-07-02T06:06:37Z")

</div>

Oh ich Idiot… ☹

Vielen Dank. So ging es problemlos. Ich hatte soviel durchprobiert… argh!

---

<div class="post-metadata">

**Author:** ![Krispin](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/krispin/32/12849_2.png) [@Krispin](https://forum.shopware.com/u/Krispin)\
**Post date:** [2. Juli 2020 um 06:13 UTC](https://forum.shopware.com/t/media-api-filtern-auf-filename/68058/4 "2020-07-02T06:13:36Z")

</div>

Hi Thomas,

alles gut, manchmal sieht man es selbst nicht und dann ist eine externe Sicht ganz gut 😉

Hauptsache ist ja nur, dass es jetzt läuft.

Gruß

Krispin
