MultiUpload save to DataBase

ynternet 17 Mar, 2013
Hi,

when I use single file upload to upload image, it works fine for me. But, when I replace "File Upload" element with "Multi Upload", it stops work... Files are uploaded fine, but "file names" are not saved to my DataBase.

I'm lost with this element, and I dont know what to do.

Please, can you just show me what I have to do with this element ? I think, that there is some array problem... maybe... but as I said, I'm absolutly lost with this element.
GreyHead 18 Mar, 2013
Hi ynternet,

Please drag a Debugger action into the On Submit event, then submit the form and post the debug results here.

Bob
ynternet 18 Mar, 2013

Array
(
    [chronoform] => group_webstranky
    [event] => submit
    [Itemid] => 250
    [option] => com_chronoforms
    [view] => form
    [group_weby_strana] => 1
    [group_weby_meno] => 1
    [group_weby_url] => http://ynternet.eu
    [multi_upload_limit_group_weby_printscreen] => 3
    [group_weby_udaje] => try_text
    [group_weby_poznamka] => try_text
    [input_submit_5] => SEND
    [bc4c91f9e3a7aef58f3a8b66e435484e] => 1
    [group_weby_printscreen] => Array
        (
            [0] => new_file1.jpg
            [1] => new_file2.jpg
            [2] => new_file3.jpg
        )

    [_PLUGINS_] => Array
        (
            [upload_files] => Array
                (
                    [group_weby_printscreen] => Array
                        (
                            [0] => Array
                                (
                                    [name] => new_file1.jpg
                                    [original_name] => file1.jpg
                                    [path] => path/new_file1.jpg
                                    [size] => 350702
                                    [link] => path/new_file1.jpg
                                )

                            [1] => Array
                                (
                                    [name] => new_file2.jpg
                                    [original_name] => file2.jpg
                                    [path] => path/new_file2.jpg
                                    [size] => 31416
                                    [link] => path/new_file2.jpg
                                )

                            [2] => Array
                                (
                                    [name] => new_file3.jpg
                                    [original_name] => file3.jpg
                                    [path] => path/new_file3.jpg
                                    [size] => 49190
                                    [link] => path/new_file3.jpg
                                )
                        )
                )
        )
    [chronoform_data] => Array
        (
            [cf_uid] => b6e2fc5aa78946b3b545d6437a05faf2
            [cf_created] => 2013-03-18 10:55:39
            [cf_created_by] => 0
            [cf_ipaddress] => 217.67.19.103
            [cf_user_id] => 0
            [chronoform] => group_webstranky
            [event] => submit
            [Itemid] => 250
            [option] => com_chronoforms
            [view] => form
            [group_weby_strana] => 1
            [group_weby_meno] => 1
            [group_weby_url] => http://ynternet.eu
            [multi_upload_limit_group_weby_printscreen] => 3
            [group_weby_udaje] => try_text
            [group_weby_poznamka] => try_text
            [input_submit_5] => SEND
            [bc4c91f9e3a7aef58f3a8b66e435484e] => 1
            [group_weby_printscreen] => Array
                (
                    [0] => new_file1.jpg
                    [1] => new_file2.jpg
                    [2] => new_file3.jpg
                )

            [_PLUGINS_] => Array
                (
                    [upload_files] => Array
                        (
                            [group_weby_printscreen] => Array
                                (
                                    [0] => Array
                                        (
                                            [name] => new_file1.jpg
                                            [original_name] => file1.jpg
                                            [path] => path/new_file1.jpg
                                            [size] => 350702
                                            [link] => path/new_file1.jpg
                                        )

                                    [1] => Array
                                        (
                                            [name] => new_file2.jpg
                                            [original_name] => file2.jpg
                                            [path] => path/new_file2.jpg
                                            [size] => 350702
                                            [link] => path/new_file2.jpg
                                        )

                                    [2] => Array
                                        (
                                            [name] => new_file3.jpg
                                            [original_name] => file3.jpg
                                            [path] => path/new_file3.jpg
                                            [size] => 350702
                                            [link] => path/new_file3.jpg
                                        )
                                )
                        )
                )
            [cf_id] => 17
        )
    [chronoform_data_cf_id] => 17
)


Validation Errors:
Array
(
)


Debug Data

    Upload routine started for file upload by : group_weby_printscreen
    path/new_file1.jpg has been uploaded successfully.
    Upload routine started for file upload by : group_weby_printscreen
    path/new_file2.jpg has been uploaded successfully.
    Upload routine started for file upload by : group_weby_printscreen
    path/new_file3.jpg has been uploaded successfully.



I renamed images and path, because of overview... I used "Multiupload" action. With "Upload files" action is the same prblem...

To clarify - in database.table I have column "group_weby_printscreen" - VARCHAR 2000 signs.



MultiUpload save to DataBase image 1
MultiUpload save to DataBase image 2
MultiUpload save to DataBase image 3
Max_admin 24 Mar, 2013
1 Likes
Hi,

Please drag a "Handle arrays" action before the "DB Save" action, that should handle the array value under "group_weby_printscreen" and get it saved concatenated, however, this is not the best practice if you will need to use the names later, you may need a separate database table for that with a foreign key, this is a different story though!🙂

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.