retrieve the filename upload

Hi,

​I have created a virtual field (document) to upload multi files.

I would need the file name to try out some copy file function.

​I uploaded 5 files at one time and I want to echo the filename of these 5 files. I tried below, but it does not shows the filename.
​echo {document};

​Can someone kindly help. Thanks.

Basically, onAfterInsert event, I included the following so that when I uploaded the files and saved, I would want all the files to copy to another location. The path somehow does not work when I included in scriptcase.

​$srcfile=“C:\Program Files\NetMake\v9\wwwroot\myproject_lib\file\doc{document}”;
$dstfile=“C:\Program Files\myproject_lib\file\doc{document}”;
copy($srcfile, $dstfile);

Try a var dump instead of echo. Most likely it’s an array since it’s multi file.