boboldehampsink / import

DEPRECATED - Import plugin for Craft CMS
MIT License
177 stars 28 forks source link

Be able to choose from multiple Assets Sources #170

Open outline4 opened 7 years ago

outline4 commented 7 years ago

Hi,

I have a very large Image Collection. In order for Craft to be able to index the files I had to create multiple Asset Sources... I knew that this would somehow backfire on me :(

So my question is: Could you make this happen? Or could you point me to the location where I could hard code this?

And another question: Because I have a lot of folders and subfolders (the images span over 10 years), there are some images that have the same name. Of course this will confuse the asset matching. So I thought of putting the full image url into the csv. Will this work?

Have a nice day/night Stefan

masiorama commented 6 years ago

@outline4 I guess you should investigate on the method prepAssetsFieldType, which is where the code loops for folders getting the attribute 'sources', which in my case is always the first asset folder.

I'm trying to achieve the same result, but so far no results. Do you have any updates on that?

update: I debugged the code in depth and the multiple asset sources depends merely on the the settings of your field. So you simply need to assign those sources to your field and then they will be traversed as expected.

For the second part of your question I have no idea.

outline4 commented 6 years ago

You are right... I found that myself. Before every import I chose the asset folder in the file settings . That way I could also eliminate some duplicate file names. But not all of them. It was a mess 👎