I want to find an uploaded file so I can open and process it. I can see this with the debugger...
I tried to get the path using the following PHP:
This produces the following error:
And My Path prints the value 2 (the index of the value in the array, I presume.
Thanks in advance for any help.
Array
(
[csvFile] => Array
(
[name] => 20160229213250_test.csv
[original_name] => test.csv
[path] => /home/xxxxxxx/xxxxxx/xxxx/components/com_chronoforms5/chronoforms/uploads/BasicUpload/20160229213250_test.csv
[size] => 3593
[link] => http://xxxx.xxxxxx.co.uk/components/com_chronoforms5/chronoforms/uploads/BasicUpload/20160229213250_test.csv
)
)
I tried to get the path using the following PHP:
<?PHP
$myFile = $form->data['csvFile']['path'];
echo("My PATH = " . $myFile);
?>
This produces the following error:
Warning: Illegal string offset 'path' in.....custom_code.php
And My Path prints the value 2 (the index of the value in the array, I presume.
Thanks in advance for any help.
Hello batvink,
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
Multiple file uploads from an iPad/iPhone don't work
How to use file uploads in my edit form ?
How can I add a file upload to my form?
How can I upload files under some user's folder
How can I Upload Files in a Multi Page form?
How can I delete old file uploads?
How can I zip uploaded files?
How do I use the Multi File Upload widget?
How can I edit uploaded files in a form?
How can I attach uploaded files to an email?
How can I validate and debug file uploads?
How can I link to an uploaded file?
I get a 500 Error when I upload a file
P.S: I'm just an automated service😉
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
Multiple file uploads from an iPad/iPhone don't work
How to use file uploads in my edit form ?
How can I add a file upload to my form?
How can I upload files under some user's folder
How can I Upload Files in a Multi Page form?
How can I delete old file uploads?
How can I zip uploaded files?
How do I use the Multi File Upload widget?
How can I edit uploaded files in a form?
How can I attach uploaded files to an email?
How can I validate and debug file uploads?
How can I link to an uploaded file?
I get a 500 Error when I upload a file
P.S: I'm just an automated service😉
Hi batvink,
The file name will be in $form->data['csvFile'], the link, path,, etc are in $form->files['csvFile'] so
Bob
The file name will be in $form->data['csvFile'], the link, path,, etc are in $form->files['csvFile'] so
<?php
echo "My PATH = {$form->files['csvFile']['path']}";
?>
Bob
This topic is locked and no more replies can be posted.