Buy Now
Sign in

How to get the list of uploaded files with this PHP

shiluba , December 10 2019, 15:21
S
shiluba 39
December 10 2019, 15:21 #390292
Hi,
With CFv5, after a File upload action , I could get an array of all the uploaded files with this PHP code :
$form->files

With CFv6, it does not work with :

$this->files

Does anybody know how to get this information with PHP ?

healyhatman 9
December 11 2019, 02:45 #390303
$this->data('fieldname')
If you've done the upload action then you'll want
$this->var('action_name')
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
S
shiluba 39
December 11 2019, 07:37 #390306
In my case, it should be
$this->var('action_name')
But it gives me this error :
0 Call to undefined method G2\L\View::var()
This error still shows up after I re-installed CFv6. I'm stuck. How can I fix that ?
healyhatman 9
December 11 2019, 07:50 #390307
I meant get sorry not var
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
S
shiluba 39
December 11 2019, 08:07 #390308
 Answer
No problem. It works like a charm with
$this->get('action_name')
Thank you