file upload shows up as a string.

sifaka 22 Dec, 2014
My file upload comes to my email as a bunch of letters in the body of the email, e.g,
document uploaded: 20141222212411_chili.docx.
Is there a really simple correction for this? Also, my checkbox array comes through like this:
destination languages: array ( 0 => 'Arabic', 1 => 'French', 2 => 'German', ),
if that is part of my problem. Thank you.
GreyHead 23 Dec, 2014
Hi sikfaka,

Which versions of ChronoForms and Joomla! are you using?

The file name looks correct - what exactly is the problem?

Please drag a Handle Arrays action into the OnSubmit event to Handle the array values.

Bob
sifaka 23 Dec, 2014
Chronoforms V5 and Joomla! 3.3.6. The website is appending the "20141222212411_" to my "filename.docx" when it sends it. And it is a string, not a link to open the file. It's just a bunch of characters, a filename with no file.
Do you include the upload_file field just the same as the rest of the field names in the Switch Editor Email template, when you're editing the Email Action?
Like this:
document uploaded: {document_upload}

I think I'm missing something simple.
the addition of Handle Array fixed the other problem. Thank you.
GreyHead 23 Dec, 2014
Hi sikfaka,

Yes, ChronoForms adds a date-time string to the file name so that if someone else later uploads a chili.docx there isn't a conflict.

The file path is available in the $form->files array (the URL should also be there but there's a bug and it shows the path also).
$form->files: Array ( 
  [file1] => Array ( 
    [name] => 20141223181516_test_image.jpg 
    [original_name] => test_image.jpg 
    [path] => /home/greyhead/components/com_chronoforms5/chronoforms/uploads/demo-file-upload/20141223181516_test_image.jpg 
    [size] => 12597 
    [link] => /home/greyhead/components/com_chronoforms5/chronoforms/uploads/demo-file-upload/20141223181516_test_image.jpg
  )
)


Bob
sifaka 24 Dec, 2014
So my uploaded file is stored in my Chronoforms components folder. How do I get it to my boss's email inbox? I'm not getting a link in my email, or an attachment with the email.
[code]Array
(
[document_upload] => Array
(
[name] => 20141224015532_chili.docx
[original_name] => chili.docx
[path] => /home/enlacesl/public_html/components/com_chronoforms5/chronoforms/uploads/deutsch_drei/20141224015532_chili.docx
[size] => 12283
[link] => http://enlaceslanguagesolutions.com/components/com_chronoforms5/chronoforms/uploads/deutsch_drei/20141224015532_chili.docx
)

)[/code]

I am not seeing any link in the email. What am I missing? (And please don't say "brains.")
GreyHead 24 Dec, 2014
Hi sikfaka,

If you want it attached to the email then you add document_upload to the Attachments box in the Email setup - and make sure that the Email action is after the Upload Files action.

And the file is uploaded to the folder you specify in the Upload Files action - if you leave that blank then it defaults to components/com_chronoforms5/chronoforms/uploads/form_name/

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