shopware / shopware

Shopware 6 is an open commerce platform based on Symfony Framework and Vue and supported by a worldwide community and more than 1.500 community extensions
https://shopware.com
MIT License
2.83k stars 1.03k forks source link

sw-media-upload-v2 defaultFolder attribute not working #5728

Open MaximStein opened 4 days ago

MaximStein commented 4 days ago

PHP Version: 8 | Shopware Version: 6.6 | Affected area / extension: Platform(Default)


Actual behaviour:

The component sw-media-upload-v2, used on an admin page, has an attribute "defaultFolder", in the documentation it's described as "The path where the file will be put". The attribute is ignored though, placing the file in the root media directory. Same behaviour whether the specified folder already exists or not.

<sw-media-upload-v2 uploadTag="myTag" :allowmultiselect="false" variant="regular" :autoupload="true" label="My image-upload" defaultFolder="MyCustomFolder"></sw-media-upload-v2>

Expected behaviour:

The file should be placed in the directory specified.

How to reproduce:

use the media-upload-v2 component on a custom admin page:

<sw-media-upload-v2 uploadTag="myTag" :allowmultiselect="false" variant="regular" :autoupload="true" label="My image-upload" defaultFolder="MyFolder"></sw-media-upload-v2> <sw-upload-listener @media-upload-finish="(event) => onUploadFinish(event, surface)" auto-upload uploadTag="myTag"></sw-upload-listener>

The uploaded file will be placed in the root media directory, instead of "MyFolder".

shopwareBot commented 4 days ago

[public] Shopware automated response: This issue is linked to the internal issue: NEXT-39862

[created from NEXT-39862, comment 518821]