Hi,
My use case is the following :
Articles files are stored in files/articles
and there i have a file named files/articles/myarticle.jpg
When i create articles by feeds, the xml file i'm parsing contains many nodes that use the same myarticle.jpg.
The result is that we create many file entities, duplication of files files/articles/myarticle_N.jpg and the media browser is full of same visual image.
I looked at #1171114: Allow user to choose the method of file handling. but my aim is not only to not have duplicate files but also not duplicating entities and use the existant entity instead of creating a new one (base on the uri).
Comment | File | Size | Author |
---|---|---|---|
#5 | feeds_2093829_5_resuse_existing_files.patch | 2.96 KB | izus |
#1 | feeds_2093829_1_resuse_existing_files.patch | 3.32 KB | izus |
Comments
Comment #1
izus CreditAttribution: izus commentedHi again,
The following patch is adding a form with a checkbox to choose having this feature or not.
it makes use of existant file entity if it has the same uri than the file we are creating.
Hopefully it helps.
Comment #3
izus CreditAttribution: izus commented#1: feeds_2093829_1_resuse_existing_files.patch queued for re-testing.
Comment #5
izus CreditAttribution: izus commentednew patch against the 7.x-2.x branch.
Comment #6
twistor CreditAttribution: twistor commentedAs you mentioned in #1171114: Allow user to choose the method of file handling. these are very similar.
The solution in that issue is what we'll do going forward, since a per-mapping setting is better than a global setting.
I would appreciate some testing on that issue.
Thanks!
Comment #7
vrajak@gmail.com CreditAttribution: vrajak@gmail.com commentedIs there any Drupal 8 Feeds version of this option? In dire need of it.