# Error message: File Extension Not Supported Exception

**URL:** <https://forum.shopware.com/t/error-message-file-extension-not-supported-exception/97059>\
**Category:** Shopware 6 (English)\
**Created:** [10. November 2022 um 21:35 UTC](https://forum.shopware.com/t/error-message-file-extension-not-supported-exception/97059 "2022-11-10T21:35:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mr\_X](https://avatars.discourse-cdn.com/v4/letter/m/22d042/32.png) [@Mr\_X](https://forum.shopware.com/u/Mr_X)\
**Post date:** [10. November 2022 um 21:35 UTC](https://forum.shopware.com/t/error-message-file-extension-not-supported-exception/97059/1 "2022-11-10T21:35:03Z")

</div>

Hi Forum,

maybe you can help me.

I am following this tutorial [LINK](https://developer.shopware.com/docs/guides/plugins/plugins/content/media/add-custom-file-extension) to add a new file extenstion to my new shopware shop. Instead of img I would like to allow stl as well. But I am getting this error message in debug.log.

[2022-11-10T21:20:34.710024+00:00] request.INFO: Matched route „api.action.media.upload“. {„route“:„api.action.media.upload“,„route\_parameters“:{„\_route“:„api.action.media.upload“,„\_routeScope“:[„api“],„\_controller“:„Shopware\Core\Content\Media\Api\MediaUploadController::upload“,„mediaId“:„0003491cfbb54836a11a0a7876ec06da“},„request\_uri“:„[https://www.domain.com/api/\_action/media/0003491cfbb54836a11a0a7876ec06da/upload?extension=stl&fileName=Batterien-AAA",„method“:"POST](https://www.domain.com/api/_action/media/0003491cfbb54836a11a0a7876ec06da/upload?extension=stl&fileName=Batterien-AAA%22,%22method%22:%22POST)“}

[2022-11-10T21:20:34.757928+00:00] request.ERROR: Uncaught PHP Exception Shopware\Core\Content\Media\Exception\FileExtensionNotSupportedException: „The file extension „stl“ for media object with id 0003491cfbb54836a11a0a7876ec06da is not supported.“ at /var/www/clients/clientx/web123/web/vendor/shopware/core/Content/Media/File/FileSaver.php line 399 {„exception“:„[object] (Shopware\Core\Content\Media\Exception\FileExtensionNotSupportedException(code: 0): The file extension "stl" for media object with id 0003491cfbb54836a11a0a7876ec06da is not supported. at /var/www/clients/clientx/web123/web/vendor/shopware/core/Content/Media/File/FileSaver.php:399)“}

Does someone can give me a hint?

BR

---

<div class="post-metadata">

**Author:** ![cci-woelfel](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/cci-woelfel/32/24017_2.png) [@cci-woelfel](https://forum.shopware.com/u/cci-woelfel)\
**Post date:** [17. Dezember 2024 um 10:42 UTC](https://forum.shopware.com/t/error-message-file-extension-not-supported-exception/97059/2 "2024-12-17T10:42:25Z")

</div>

Der Fehler tritt auf, weil Shopware versucht, eine Datei mit der Erweiterung `.stl` hochzuladen, aber diese Erweiterung standardmäßig nicht unterstützt wird. In Shopware gibt es eine Beschränkung der Dateitypen, die durch den `FileSaver` in der `FileSaver.php` Datei validiert werden.

---

<div class="post-metadata">

**Author:** ![Mr\_X](https://avatars.discourse-cdn.com/v4/letter/m/22d042/32.png) [@Mr\_X](https://forum.shopware.com/u/Mr_X)\
**Post date:** [17. Dezember 2024 um 11:07 UTC](https://forum.shopware.com/t/error-message-file-extension-not-supported-exception/97059/3 "2024-12-17T11:07:34Z")

</div>

Hallo cci-woelfel,

vielen Dank für deine Antwort. Ich konnte das Problem in der Zwischenzeit selber lösen.

VG

---

<div class="post-metadata">

**Author:** ![system](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/3X/2/9/29c7587ba660f00e4995d1743162782e5d6d8653.svg) [@system](https://forum.shopware.com/u/system)\
**Post date:** [16. Januar 2025 um 11:07 UTC](https://forum.shopware.com/t/error-message-file-extension-not-supported-exception/97059/4 "2025-01-16T11:07:42Z")

</div>

Dieses Thema wurde automatisch 30 Tage nach der letzten Antwort geschlossen. Es sind keine neuen Antworten mehr erlaubt.
