Skip to content
This repository has been archived by the owner on Apr 5, 2018. It is now read-only.

Be able to choose from multiple Assets Sources #170

Open
outline4 opened this issue Aug 30, 2017 · 2 comments
Open

Be able to choose from multiple Assets Sources #170

outline4 opened this issue Aug 30, 2017 · 2 comments

Comments

@outline4
Copy link

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
Copy link

masiorama commented Oct 17, 2017

@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
Copy link
Author

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 👎

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants