how to download images has to leave d' a field URL

One Star

how to download images has to leave d' a field URL

hello
i ve a probleme for load image from a field who contains url image.
i want to load in a folder all pictures of these urlfield
i'm french sorry for my english
ex fichier
id isbn name url_image
1 6 coquilles St Jacques royales à la normande http://backoffice.toupargel.fr/uploads/TOUPARGEL/PHOTO1/6016400/000000.jpg
2 8 paniers gourmands jambon fromage http://backoffice.toupargel.fr/uploads/TOUPARGEL/PHOTO1/6039900/000000.jpg
3 Paella royale http://backoffice.toupargel.fr/uploads/TOUPARGEL/PHOTO1/6226000/000000.jpg
4 Hauts de cuisses de poulet http://backoffice.toupargel.fr/uploads/TOUPARGEL/PHOTO1/6814700/000000.jpg
5 Tropézienne http://backoffice.toupargel.fr/uploads/TOUPARGEL/PHOTO1/7217200/000000.jpg
etc
Community Manager

Re: how to download images has to leave d' a field URL

Hi
Iterate each row and download the image using tFileFetch, for example:
tFileInputDelimited--row1--tFlowToIterate---iterate--->tFileFetch
Set the url field of tFileFetch as:row1.url_image
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: how to download images has to leave d' a field URL

Ok merci ca marche

Re: how to download images has to leave d' a field URL

Hi shong.. I'm working on TOS 4.1.2.
my source file is a csv file and is as below.It contains only one column i.e. url_image
url_image
http://graphics8.nytimes.com/images/2007/10/01/timestopics/google1.jpg
http://cdn.androidcommunity.com/wp-content/uploads/2011/02/google-music-logo.jpg
http://www.internetmarketinginc.com/blog/wp-content/uploads/2010/04/google-beta.jpg
http://img.blogsolute.com/google-classic.jpg
I designed a job as you suggested in the above post.And the tFileFetch settings are as below.
protocol: http
url: row1.url_image
Destination directory: "E:/dsc"
destination filename: dsc.jpg
I'm getting only the last image into my directory. And even i'm getting errors like "There is an exception on: url_image
java.lang.IllegalArgumentException: host parameter is null"...
Plz help me.
One Star

Re: how to download images has to leave d' a field URL

it's normal change your destination filename with a timestamp variable on it or leave it blank it should keep the orignal filename