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).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

izus’s picture

Status: Active » Needs review
FileSize
3.32 KB

Hi 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.

Status: Needs review » Needs work

The last submitted patch, feeds_2093829_1_resuse_existing_files.patch, failed testing.

izus’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, feeds_2093829_1_resuse_existing_files.patch, failed testing.

izus’s picture

Version: 7.x-2.0-alpha8 » 7.x-2.x-dev
Status: Needs work » Needs review
FileSize
2.96 KB

new patch against the 7.x-2.x branch.

twistor’s picture

Status: Needs review » Closed (duplicate)

As 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!

vrajak@gmail.com’s picture

Is there any Drupal 8 Feeds version of this option? In dire need of it.