data['_PLUGINS_']['articolo']['link'];?>How can I solve??😟"> MultiUpload file link on database - Forums

Forums

MultiUpload file link on database

livingwebstudio 04 Dec, 2015
Hi,
I have a simple form with a multiupload file
I need to save in DB the link of each file thah I upload.
I have this debug
Array
(
    [articolo] => Array
        (
            [name] => 23_Errori_dmb.docx
            [original_name] => Errori_dmb.docx
            [path] => articoli/201512040927_645_23/23_Errori_dmb.docx
            [size] => 13536
            [link] => articoli/201512040927_645_23/23_Errori_dmb.docx
        )

    [foto] => Array
        (
            [0] => Array
                (
                    [name] => 23_dmb_contatti.png
                    [original_name] => dmb_contatti.png
                    [path] => articoli/201512040927_645_23/23_dmb_contatti.png
                    [size] => 36176
                    [link] => articoli/201512040927_645_23/23_dmb_contatti.png
                )

        )

)

Uploaded one file "articolo" and two file "foto"

I used this custom code for "Articolo" but it doesn't work..
<?php
$form->data['articolo_url'] = $form->data['_PLUGINS_']['articolo']['link'];
?>


How can I solve??😟
GreyHead 04 Dec, 2015
Answer
1 Likes
Hi livingwebstudio,

Please try
<?php
$form->data['articolo_url'] = $form->files['foto'][0]['articolo']['link'];
?>

Bob
livingwebstudio 04 Dec, 2015
1 Likes
Hi GreyHead,
this code works fine for the
<?php
$form->data['articolo_url'] = $form->files['articolo']['link'];
?>

and this code works for multiple upload
$form->data['file0_url'] = $form->files['foto']['0']['link'];
$form->data['file1_url'] = $form->files['foto']['1']['link'];

thanks
This topic is locked and no more replies can be posted.