Sahil
4 years agoContributor
Curly brackets in filename
Hi,
I am using Multi File reader snap but is not picking correctly filename if it has curly brackets.
filename is like: abcd{334-ffg-gg}.xml
How to handle these kind of schenarios.
Hi,
I am using Multi File reader snap but is not picking correctly filename if it has curly brackets.
filename is like: abcd{334-ffg-gg}.xml
How to handle these kind of schenarios.
Hi @Sahil,
What do you mean by “not picking correctly the filename if it has curly brackets” ? Does it throw any errors ? I’m pretty sure that you can read a file with a name like ‘abcd{334-ffg-gg}.xml’ without any problems.
I agree:
Hi,
My pipeline is like below:-
and use the content-location & content-disposition in child pipeline.
But it is passing file as abcd_334-ffg-gg_.xml
If you are trying to get the name of the file in the child pipeline, you can pass the content-location
header. I don’t know where are you reading the file from, but if it’s SLDB, the header value should look like this:
And if you want to get the filename only, you can use this expression: $['content-location'].split("/")[$['content-location'].split("/").length - 1]
this will return the name of the file.
Do you happen to have the expression toggle (the button with = sign) selected?