Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello. Trying to make the import of goods via Feeds and Feeds Tamper.
I can not implement the following: in the import csv image registered as a link to other resources, for example http://site.com/qwe.jpg
I want to when you import an image to change the name - and was not qwe.jpg, but asd.jpg
does it really make?
Comments
Comment #1
twistor CreditAttribution: twistor commentedIt seems like the find/replace or Find replace REGEX plugins will work.
I'm not entirely sure what you are asking, if you could try to re-word your question, I could help better.
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedI want to do that when you import images, their names were changed. ie the original name of image from other sites - qwe.jpg, and it is necessary that it is renamed to [title].jpg
Comment #3
twistor CreditAttribution: twistor commentedThis is not possible. Since you need to download the image, the file name needs to stay the same.
Comment #4
paul_constantine CreditAttribution: paul_constantine commentedSorry to open a long-gone issue.
I have the file already on my localhost - no need to download it. But I still need to change the filename of the jpg because a third-party app just updates the jpg under the same name. So the name stays the same, but the content changes and is applied to a node-type with each feed update.
Feeds itself just adds a version number to the file like this x.jpg, x-0.jpg, x-1.jpg, x-2.jpg ...
The xml feed contains a name for the file. But whenever I use the feeds tamper function "rewrite" and add the token for the image name (from the xml feed) I get an error message "The file cover_name has an invalid extension" and no image is imported. The xpath parser is using that name for the image title, and the image alt title ... so that's working.
Why doesn't it work for the filename as a whole? Renaming files is not such a new concept.
Or am I using the wrong plugin for my task?
Best wishes,
Paul
Comment #5
paul_constantine CreditAttribution: paul_constantine commentedMaybe I need to simplify my question.
What exactly can the plugin "rewrite" acctually rewrite?
Is it possible for this plugin to rewrite the filename of a jpg-file in the feeds folder on the localhost?
Some input would be great.
Many thanks,
Paul
Comment #6
sano CreditAttribution: sano commentedthe rewrite plugin allows you to construct a new string out of random (custom) text and the tokens listed below the text area in the plugin. It does not rewrite any file names or paths.