Forums

saving file path in the table instead of jus the file name

joskam 22 May, 2015
Hi I have created a form with several uploads. However when I access the data, only the file name is saved and not the file path.
This doesn't allow me to download the file.
How can I Save the whole path so that I can get a link allowing me to download these Files.
Thanks in advance.
GreyHead 22 May, 2015
Hi joskam,

If they are all saved in the same folder then you can create a link using just the filename.

If you want to save the full folder path or URL then these are available in the $form->files array and you scan save the value using a Custom Code action with code like this:
<?php
$form->data['file_path'] = $form->files['input_name']['path'];
$form->data['file_link'] = $form->files['input_name']['link'];
?>
Please add a Debugger to your form On Submit event to see the correct names to use for your form.

Bob
joskam 27 May, 2015
Hi Greyhead.

Thanks for your reply.

I managed to download the files using ChronoConnectivity.
This topic is locked and no more replies can be posted.