I dont think it works, because the file name is defined in the tFileFetch component (property "destination Filename"), it is not fetched directly from the URI....
I would have be nice if this "destination filename" property was not mandatory, so the file extension would have been fetched from the URI...
Regards
Hi,
You can create an arborescence depending on your URI (checkbox). I don't know if your URIs have different arborescence, but if not you could use it to get the name of the file. Furthermore I don't know how your job is designed, but you could also try to put your URI in a context variable and use this context to get what you want. Can you post a screenshot of your job?
How do you get your URI? If your URI comes from a context variable, it's quite simple to get the extension by using row.substring(context.myvariable.lastIndexOf('.')).
Hi,
This is not as easy as it might seem in my opinion. Having a URI with an extension like .jsp doesn't mean the file you receive is of type jsp (whatever that may be), it could as well be an image that is send back. (How should the job know that the URI "
https://community.talend.com/t5/Design-and-Development/tfilefetch-and-file-extension/td-p/115056" returns an HTML page for example?)
I don't know how to solve this, it's just that I don't think just looking for a . in a URI is enough to really solve this problem.
Maybe interpretation of the retrieved content is necessary to determine content type and therefor a possible extension, I don't know...
Best regards,
Arno