Hi,
in my form I have a File Upload element
and the corresponding Upload Files [GH] action. The upload works nicely.
But - when I use the form and choose the file - the field in the data array for the file name stays empty until the Upload Files action finished.
To confirm the empty array field I added a Custom Code before the Upload Files action
and I get: Dateiname: !!
Is there a chance to get a grip on the file name BEFORE the Upload Files action runs ?
Thx a lot,
Doris
in my form I have a File Upload element
<input type="hidden" name="dateiname" value="" alt="ghost" />
<input id="dateiname" title="" type="file" name="dateiname" />
and the corresponding Upload Files [GH] action. The upload works nicely.
But - when I use the form and choose the file - the field in the data array for the file name stays empty until the Upload Files action finished.
To confirm the empty array field I added a Custom Code before the Upload Files action
<?php
echo "Dateiname: !" . $form->data['dateiname'] ."!<br>";
?>
and I get: Dateiname: !!
Is there a chance to get a grip on the file name BEFORE the Upload Files action runs ?
Thx a lot,
Doris
Hi Dorothy,
What are you actually trying to do?
You can get the name of the uploaded file from the $_FILES array, but, as the Upload Files action may change the name, the saved name could be different. If you configure the Upload Files action to include a random string or a date-time element then you can't reliably know what it is beforehand.
Bob
What are you actually trying to do?
You can get the name of the uploaded file from the $_FILES array, but, as the Upload Files action may change the name, the saved name could be different. If you configure the Upload Files action to include a random string or a date-time element then you can't reliably know what it is beforehand.
Bob
Hi Bob,
it's Doris๐
Thanks for your answer.
I was thinking about different actions depending on the chosen file, now that I got the Event Switcher running...
Where do I find the $_FILES array ?
Thx,
Doris
it's Doris๐
Thanks for your answer.
I was thinking about different actions depending on the chosen file, now that I got the Event Switcher running...
Where do I find the $_FILES array ?
Thx,
Doris
Hi Doris,
The $_FILES array is the PHP array with the information about uploaded files. More information in the PHP Manual here.
Bob
The $_FILES array is the PHP array with the information about uploaded files. More information in the PHP Manual here.
Bob
This topic is locked and no more replies can be posted.