Allow option to select how Assets should be matched #907
Replies: 5 comments
-
I'm using the built-in Craft Element Exporter in Craft 3.4.13 and the exported JSON is an Element ID on the fields with assets. As far as I can tell, Feed Me doesn't know what to do with that data nor does it give me an option to select ID as the provided data like an Entries field would, for example (as pointed out by Ben). Am I missing something or are these two Craft features incompatible at the moment? |
Beta Was this translation helpful? Give feedback.
-
I have to migrate thousands of images, some of them are bound to have the same filename despite being in completely different subfolders. Having a way of matching even on a custom field would be fine, like when matching with an Entry field. Is there a workaround in the meantime? Currently, Feed Me seems to not be able to distinguish between two files that share the same filename, even when providing it the a path. Is there any update on this? |
Beta Was this translation helpful? Give feedback.
-
+1 on this idea - treat importing to an asset field the same as importing to an entry field. In my use case, I've imported thousands of images from a WordPress media library, with their accompanying IDs. Now I want to import thousands of WordPress posts, which have "featured images" keyed off of those images' internal WordPress IDs. I have the media stored natively as Craft assets, and I have their old IDs available to match on, but no way for FeedMe to do this. |
Beta Was this translation helpful? Give feedback.
-
I’ve run into this today as I was hoping to quickly export some entries from a local environment to a JSON file, then import the entries in other envs via FeedMe. As @johnj24 mentioned, given that Craft’s native export function outputs Asset IDs it seems like an oversight that the first-party import plugin doesn’t know how to handle those Asset IDs. Surely the two systems should at least be consistent with one another. I appreciate you can generate custom JSON data with the Element API plugin, but my intention here was to quickly move some entry data between envs, and the more time I have to spend manually tweaking the import/export flow the less likely I am to be making any efficiency savings vs just manually recreating all of the entries by hand. Edit: submitted a PR. |
Beta Was this translation helpful? Give feedback.
-
Resolved in #1327 and will be included in the next release. |
Beta Was this translation helpful? Give feedback.
-
Description
Currently, when importing Users FeedMe presents a dropdown of the value we are providing that will be used to match the user, such as ID or Email.
With Assets, no similar option exists. Assets require that we provide a filename and don't give us an option to choose to match by ID if we know the Element ID we wish to match.
Perhaps my concern is misplaced, but I don't believe filenames need to be unique if they exist in different folders and an Asset Field could allow a user to upload Assets to more than one folder. While I expect it's an uncommon scenario and FeedMe is probably doing something behind the scenes to decide which file to match if two files of the same name exist as options to be selected in a given Asset Field, there is less need to ask questions about how all that works and to just use a unique ID if we happen to know it.
Additional info
Beta Was this translation helpful? Give feedback.
All reactions