How do I get the file name without /storage/emulated/....?

I want to display the file name after selection from the device storage.

How do I just show “video.mp4” instead of the precise location of the file like.


I’m using video picker component.

Use replace text block

Do it like this

storage/emulated/0/DCIM/Camera/video.mp4 should be in ‘text’ and
storage/emulated/0/DCIM/Camera/ should be in ‘segment’
Or I’m wrong?

1 Like

No you’re correct.

1 Like

I did this however, if the file location is something else, this doesn’t work anymore.

You can try this approach, without hard-coding file paths:


It worked, thanks.

1 Like

You are correct

I was Doing in Phone so it got mismatched

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.