Get filename in webform with Rules I need to get just the file name from a file submitted in a Webform.

In actions, I try to execute the following code at a "Show a message on the site" action:

$path = "[data:component-value]";/*a REPLACEMENT PATTERN that return http://mysite.com/files/webform/submittedfile.pdf*/
$file = basename($path);/*$file is set to "submittedfile.pdf"*/
echo $file; /*this *should* return submittedfile.pdf*/


But ALWAYS return http://mysite.com/files/webform/submittedfile.pdf

I've tested ltrim, rtrim, god_trim_for_me and chop. And it always return the full URL.

What am I doing wrong?
I have managed to find an answer to my question

What I am doing wrong:

$path need set before.



In the value: [data:component-value]
Named the variable (ex: link_from_hell)

So, the next action you can manipulate the $patch.