Closed maxfrischknecht closed 2 years ago
How exactly are you uploading the images? The “Default Upload Location” will only be used when you are dragging a file onto the Assets field, or pressing the “Upload files” button beside “Add an asset”. If you upload a file within the asset selection modal, it will be uploaded to the currently-selected location.
Sorry for not clarifying this earlier, I was uploading the images by clicking "+ Add an asset" and then drag & drop them into the popup dialogue. I understood this as the "field", but when I upload it directly into the field or with "Upload Files" it works.
Thank you for the support!
What happened?
Description
I followed the docs to create dynamic subfolder paths for an asset field.
Steps to reproduce
Expected behavior
Upload the image under
images/news/slug/test.jpg
.Actual behavior
Uploades the image to
images/test.jpg
(see screenshot below).Craft CMS version
4.0.3
PHP version
8.1.5
Operating system and version
Linux 3.10.0-962.3.2.lve1.5.52.el7.x86_64
Database type and version
MySQL 5.7.37
Image driver and version
Imagick 3.5.1 (ImageMagick 7.1.0-2)
Installed plugins and versions