Problem with upload function

nomadi 15 Jun, 2015
Hello,

I am trying to get the upload function to work but I had no luck. I have searched and tried many things but nothing worked.

1) Debug Data:
==================
Data Array

Array
(
    [chronoform] => apodoxiaporipsikostous
    [event] => submit
    [text1] => safhd@sdfdf.gr
    [text2] => 123123131
    [text3] => 123hkjh
    [text4] => kjsdfjf
    [text5] => skdjfkj
    [textarea7] => ksjdfksjflkjsfl
    [attachmentfile] => testing.jpg
    [g-recaptcha-response] => XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    [button9] => Submit
    [apodoxiaporipsikostous] => 
    [ip_address] => XXXXXXXX
)
==================

2) DEBUG INFO:
==================
Debug Info

Array
(
    [3] => Array
        (
            [Email] => Array
                (
                    [0] => An email with the details below was sent successfully:
                    [1] => To:XXXXXXX@gmail.com
                    [2] => Subject:Αποδοχή/ απόρριψη κόστους επισκευής
                    [3] => From name:Φόρμα επικοινωνίας ideal.gr
                    [4] => From email:support@XXXXXXX.gr
                    [5] => CC:
                    [6] => BCC:
                    [7] => Reply name:
                    [8] => Reply email:
                    [9] => Attachments:
                    [10] => Array
                        (
                        )

                    [11] => Body:
<table>
<tr><td>Email:</td><td>safhd@sdfdf.gr</td></tr>
<tr><td>Κινητό Τηλέφωνο:</td><td>123123131</td></tr>
<tr><td>Σειριακός Αριθμός:</td><td>123hkjh</td></tr>
<tr><td>Όνομα</td><td>kjsdfjf</td></tr>
<tr><td>Επώνυμο:</td><td>skdjfkj</td></tr>
<tr><td>Απάντηση από SMS:</td><td>ksjdfksjflkjsfl</td></tr>
<tr><td>Attachment:</td><td>testing.jpg</td></tr>
</table><br /><br />IP: 194.219.127.90
                )

        )

)
==================

3) I have the file upload action into the On Submit area with the following settings:
Enabled: Yes
Files config: attachmentfile:jpg
Upload Path: this is empty and I can see a folder named after my form under Chronoform component folder tree.
Array fields: this is empty
File name code: this is empty
Extensions separator: -

P.S. The "attachmentfile" is the field name and field id of the upload button in the form wizard.

4) At my send email action I have included the "attachmentfile" at the Attachment files and also included the field at the email template.

5) The upload folder has writting permissions and I also tried 777 for it.

Now what happens is that I do get an email and I can see the name of the file I tried to upload, though it is just text and not a link or anything. Then if I check my upload folder I see nothing inside.

I don't know what else to try so I would appreciate your help.

Thank you in advance.
GreyHead 15 Jun, 2015
Hi nomadi,

That all looks OK except that there is no sign of the Upload Files action.

Please add a Custom Code action to the On Submit event and add this code to it
<?php
echo'<div>$_FILES: '.print_r($_FILES, true).'</div>';
?>
Save and then submit the form again and you should see an output of the PHP $_Files array - check that to see if there is a Error code shown.

Bob
nomadi 15 Jun, 2015
Hello,

Thank you for answering so fast. I forgot to mention that I had already tried your code as I had seen it at another post. The output is empty:

$_FILES: Array ( )

Thanks again.
GreyHead 15 Jun, 2015
Hi nomadi,

Then please check the HTML (Render Form) action and check that the Form Method is set to File.

Bob
nomadi 15 Jun, 2015
Hi,

I was certain that it would be something silly of me... That did the trick and the file was uploaded at the folder as it should.

Problem is now that at my email the attachment field is now empty, when before at least it reported the filename.

Thanks again.
GreyHead 15 Jun, 2015
Answer
Hi nomadi,

Is the Upload Files action *before* the email action? If not, please drag it up. If it is, please post a new set of Debugger output.

Bob
nomadi 16 Jun, 2015
Hello,

That did the trick as well. Now the file is also attached to the email.

Thank you for your help and support.
This topic is locked and no more replies can be posted.