Forums

How to receive uploaded files

Alistair 01 Dec, 2015
I don't receive files that users upload when sending their form, every other field is fine, except uploads. I think the problem stems from the 'generate autotemplate' email function, which to be honest I never understood completely. In any case, I see that by autogenerating the email template all fields are there, except "upload", which can't be a coincidence, there must lay the reason as when I receive the email from the submitted form everything is there except the uploaded files.
Alistair 01 Dec, 2015
Nope automatic service, that's not what I asked, but good effort 🙂
GreyHead 01 Dec, 2015
Hi Alistain,

Please check the last FAQ from Prof Calculus' list.

The Generate AutoTemplate searches the form HTML for input element names and labels and puts them into a basic table layout in the Email template.

Bob
Alistair 01 Dec, 2015
Where does it explain why the upload files function is not put into the basic table layout?
https://www.chronoengine.com/faqs/52-cfv4/cfv4-emails.html
GreyHead 01 Dec, 2015
Hi Alistair,

Sorry, I assumed that you wanted to attach the uploaded files to the email - that's what the topic title said to me.

And, when I check the AutoGenerated template it does include the name and value of the file upload input*; I don't know why it doesn't work for you, you can just set the template to Custom and add the HTML manually.

Bob

* This only gives you the file name though.
Alistair 01 Dec, 2015
No problem, I do think there's something wrong with "file upload" option though, even putting the html manually myself files are not uploaded (in the email I receive I can now see the file upload field but no files attached. Also, I have filled in the users instructions as in any other field but this doesn't appear on the live website under the upload file field, that's why I say something is wrong, maybe this particular field needs specific settings which I'm not aware of. Files uploads is enabled.
GreyHead 01 Dec, 2015
Hi Alistair,

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

Bob
Alistair 01 Dec, 2015
"You can add a Debugger action to the On Load event to see what data is being received by the form."

I have these installed, but can't see any debugger action available:

ChronoForms Module V4.0.3
ChronoForms Component 4.0.6
chronoforms Plugin V4.0.3
Alistair 01 Dec, 2015
Ok, got it, found out how to enable debugging, sorry.

Data Array:

Array
(
    [chronoform] => enquiry
    [event] => submit
    [input_text_3] => try
    [input_text_15] => 
    [input_select_17] => 
    [input_text_11] => mick_p_70@yahoo.co.uk
    [input_text_12] => 
    [input_textarea_2] => try again
    [attachments_16] => signature on export certificate.jpg
    [multi_upload_limit_attachments_16] => 1
    [input_datetime_5] => 
    [input_datetime_6] => 
    [chrono_verification] => Uxzi9
    [input_submit_7] => Submit
    [input_radio_18] => 
    [e519ffefa4cbf7c3a4cfd1283b1768a0] => 1
    [_PLUGINS_] => 
)

Validation Errors:

Array
(
)

Thank you for contacting me, your inquiry has been successfully sent. I will get back to you shortly.
Debug Data

    Core Captcha
        Passed the core captcha check!
    email
        10
            Result
            An email has been SENT successfully from (email from xxxxx.com)xxxxx@xxxxx.com to xxxxx@xxxxx.com
            Body

            You can fill this out (only fields with an asterisk * are mandatory), use the contact form, or write to me directly at xxxxx@xxxxx.com and I'll get back to you shortly.

            I also speak Italian and French, for Russian please write to xxxxx@xxxxx.com, avoid online translators if possible.

            Name * 	try
            Company name 	
            Country 	
            Email * 	mick_p_70@yahoo.co.uk
            Telephone 	
            Your request * 	try again
            Upload here any useful files or photos 	
            Deadline for quotes 	
            Deadline for goods 	
            Enter the code * 	Uxzi9
             
             
            How did you find me? 	


            Submitted by xx.xx.58.199
            Attachments
            array ( )
GreyHead 01 Dec, 2015
Hi Alistair,

There is no sign of an Files Upload action there so nothing is being uploaded to CF. The problem may be the spaces in the file name. Please test again with a filename without spaces and see if that works.

Bob
Alistair 01 Dec, 2015
I put "file_upload" on the name field and ID field (I followed this video https://www.youtube.com/watch?v=pdgxL_28t18), but that's the debug I'm getting, no change at all.


If I will ever manage to make this work, where will these uploaded files go?
GreyHead 01 Dec, 2015
Hi Alistair,

On your form Setup tab the Debugger action is the third one down in the Basic actions group.

Bob
Alistair 02 Dec, 2015
I can't see it



I'm using: ChronoForms Module V4.0.3, ChronoForms Component 4.0.6, chronoforms Plugin V4.0.3
GreyHead 02 Dec, 2015
Hi Alistari,

Sorry, you are using the Simple Wizard in CFv4, not CFv5. The Debugger is a setting on the Others > Tools tab

Bob
Alistair 02 Dec, 2015
I don't understand, that's already enabled, that's why I was able to post the debug on my previous post. What I'm using I've posted twice: ChronoForms Module V4.0.3, ChronoForms Component 4.0.6, chronoforms Plugin V4.0.3
GreyHead 02 Dec, 2015
Hi Alistair,

My apologies, I have flaky internet and too many posts today.

The Uploaded files will be saved to the /components/com_chronoforms/uploads/FORM_NAME/ folder - if you switch the Type setting on the form General tab you an specify a different folder.

Just checking, are the File Uploads on that tab enabled and configured? If so, please take a Form Backup using the icon in the Forms Manager and post it here and I'll take a closer look.

Bob
Alistair 03 Dec, 2015
Hi, ok thanks, in that case I see that in /components/com_chronoforms/uploads/FORM_NAME/ folder I only have the index.html file so I suppose none of the files that were sent to me ever were uploaded. I have attached a backup.

[[>> later : backup removed <<]]
GreyHead 03 Dec, 2015
Hi Alistair,

A few changes are needed to get this to work correctly.

+ Please click on the Form Name link in the Forms Manager and change the Form Wizard Mode to Advanced (Default) and the Form method to File. Save and Close.

+ Click the Wizard Edit link and you will see the 'Normal' Wizard. Click the Actions tab and you will see next to it an Event tab with a list of events (some of these are not really needed but can be left for the moment).

+ Click the Widget Processors Link at the bottom of the Actions tab. Click and Drag a Multi Upload action into the On Submit event and then drag it up to where the Upload Files action is - there's a 'drag' icon at the right.

+ Open the Multi Upload action - there's an 'edit' icon too - and set the Fields Configuration to attachments_23:jpg-png (add other file types as needed)*. Click Apply at the top right.

+ Delete the old File Upload action - this only works with the standard file element, not with the multi-file one.

Save the form and test.

There are other settings in the Multi Upload action e.g.to set an Upload Path if you need it.

Bob

* In the current Files Upload action Files box you have 'jpg-png-gif,field2:zip-rar,field3:doc-docx-pdf' which appears to be an incomplete copy of the help test. This need to take the form of input_name:file_type_1-file_type_2 . . .
Alistair 03 Dec, 2015
Hi, as far as I can see I have covered all the steps but nothing has changed, files are still not being uploaded and the users instruction below the element still can't be seen. This is one tricky field.


[[>> later : backup removed <<]]
Alistair 07 Dec, 2015
Hi, how do I edit a previous post? I would like to remove my attachments as it makes little sense to have them there for eternity.

I've gone through many previous threads on the argument, these are a few:
http://www.chronoengine.com/forums/posts/t86888.html
http://www.chronoengine.com/forums/posts/f3/t94576.html
http://www.chronoengine.com/forums/posts/t87817.html
http://www.chronoengine.com/forums/posts/f3/t23636.html
https://www.chronoengine.com/forums/posts/f2/t100484.html
http://www.chronoengine.com/forums/posts/f2/t96754.html
http://www.chronoengine.com/forums/posts/f2/t98375.html

so I see the problem is pretty common, there must be something not right with this 'upload file' function I suppose. But the component is pretty good and worth keeping even without that upload action.
GreyHead 07 Dec, 2015
Hi Alistair,

I restored your form and the Multi Upload is working correctly - the only change I have made is (a) to the name to make sure it is unique and (b) to add a Debugger action which shows the uploads
Form Data Array
(
    [option] => com_chronoforms
    [tmpl] => component
    [chronoform] => enquiry_sourcingitaly_c
    [event] => submit
    [input_text_3] => Bob Testing
    [input_text_15] => 
    [input_select_17] => 
    [input_text_11] => test@example.com
    [input_text_12] => 
    [input_textarea_2] => Testing
    [multi_upload_limit_attachments_23] => 2
    [input_datetime_5] => 
    [input_datetime_6] => 
    [chrono_verification] => vstdx
    [input_submit_7] => Submit
    [input_radio_18] => 
    [32165909e0a90d67e8ee68ff601a46f2] => 1
    [attachments_23] => Array
        (
            [0] => 20151207012631_test_image.jpg
            [1] => 20151207012631_test_image.png
        )

    [_PLUGINS_] => Array
        (
            [upload_files] => Array
                (
                    [attachments_23] => Array
                        (
                            [0] => Array
                                (
                                    [name] => 20151207012631_test_image.jpg
                                    [original_name] => test_image.jpg
                                    [path] => /home/greyhead/my_domain.org/components/com_chronoforms/uploads/enquiry_sourcingitaly_c/20151207012631_test_image.jpg
                                    [size] => 12597
                                    [link] => http://my_domain.org/components/com_chronoforms/uploads/enquiry_sourcingitaly_c/20151207012631_test_image.jpg
                                )
                            [1] => Array
                                (
                                    [name] => 20151207012631_test_image.png
                                    [original_name] => test_image.png
                                    [path] => /home/greyhead/my_domain.org/components/com_chronoforms/uploads/enquiry_sourcingitaly_c/20151207012631_test_image.png
                                    [size] => 3040
                                    [link] => http://my_domain.org/components/com_chronoforms/uploads/enquiry_sourcingitaly_c/20151207012631_test_image.png
                                )
                        )
                )
        )
)

Bob

PS Max has set to forums to prevent post editing - this is because a while ago we had a lot of spammers who would make an innocent looking post then come back later and stuff it with URLs. I can remove any sensitive data if needed.
Alistair 07 Dec, 2015

I restored your form and the Multi Upload is working correctly - the only change I have made is (a) to the name to make sure it is unique and (b) to add a Debugger action which shows the uploads



Hi, sorry but I don't understand, which name should I correct? File ID and filed name are botht he same now after a post I read saying that could cause a problem, but still can't receive any files.

PS Max has set to forums to prevent post editing - this is because a while ago we had a lot of spammers who would make an innocent looking post then come back later and stuff it with URLs. I can remove any sensitive data if needed



Wow some people go to extreme lenghts to spam here and there..😟 Yes if it's not a problem I would like the backed up forms removed.
GreyHead 07 Dec, 2015
Hi Alistair,

I just changed the name of the form - should make no difference to your form.

By all means email or PM me the site URL, the form name, and a SuperAdmin login and I'll take a quick look.

Bob
GreyHead 07 Dec, 2015
Hi Alistair,

The enquiry file on your site was not the same as the backup you sent me. I restored the backup and renamed it to enquiry_restore and added a Debugger action, that form is uploading the files correctly - I've checked that I can see them on your server.

Bob
Alistair 07 Dec, 2015
You're quite right Rob, I just checked myself in the file manager.

Is it correct that these files are not actually attached to the email that I receive? (if the sender doesn't let me know if he/she did attach something I would never check the file manager).

Also, the description (user instructions) won't show, I just wrote to click "attach" every time a file needs to be uploaded as multiple selection is not allowed, but the istructions don't show, while they do with all other fields.
GreyHead 08 Dec, 2015
Hi Alistair,

As far as I know there isn't a simple way to add an array of files to an email in CFv4. I can think of two possible workarounds.

+ add a link to the files in the Email template - this is straightforward and you have the information to create the link.

+ Zip the files into a single file which you can then attach to the email. Please see this FAQ

Bob
Alistair 09 Dec, 2015

As far as I know there isn't a simple way to add an array of files to an email in CFv4.



Very very weird thing, if I use the "Test Form" function on the top right within the form screen it all works! (files are uploaded to server AND attached to the email I receive), but when it comes to doing it live, filling in the form from the website, it just doesn't work. Ever happened to anyone?
GreyHead 09 Dec, 2015
Hi Alistair,

Good to know that the array will work. Both links show the form in the front-end; if one fails that is usually because there is a problem with Joomla! SEF URLs and the form isn't submitting. Please try setting Relative URL to No in the form General tab, click the Form Name link in the Forms Manager and scroll down to see it.

Bob
Alistair 09 Dec, 2015
Sorry, another test I just tried, I'm saying this for general information, I don't need an answer🙂 If I select the form to be sent not in html, or maybe both html and text, I get the attachment via email!
Alistair 09 Dec, 2015
Right, sorry I hadn't noticed you had already replied, to recapitulate both of the two latter solutions work, either set relative url to no or have emails sent in both text and html, good stuff thanks!
This topic is locked and no more replies can be posted.