How to get file name where the text is inserted?

Try to use file tools extension get File list from assets block: