Join GitHub today
Create asset folders from path #485
I'm trying to import assets from an old Craft 2 site to a new Craft 3 site. I'm passing the folder path with each asset as
Do the folders need to exist before hand, or will it only work with a single folder name? I assume Feed Me doesn't create the folders automatically?
Steps to reproduce
So just to clarify, is your feed importing assets (only), or are they importing entries and assets, using an asset field?
If the latter, you can specify the folder through the
If you're importing assets, using Feed Me Pro - you can set the folder in the field mapping step, by either selecting a node in your feed that contains the folder name (just the folder name), or select a default folder from the list provided.
But - to answer your question, it looks like we don't create the folders if they don't exist. I've added this as an option in 3.1.15
The reason that we don't assume the path in your feed should equate to how its structured in Craft is that there's such a wide variety of formats to cater for. If you're trying to upload assets from a remote URL, should we create folders based on the URL path? Similarly for local assets as well.