Forums

Problems with fileuploads

F. 17 Feb, 2015
Hello there,

First of a great thank you for this powerful component! I love it
Now to my Question:

- I created a form with a file upload.
- the name of the upload field is : input_file_1
- i setted up file upload location which is : /html/images/upload/
- permission of the upload folder is 777
- i set the Email Attachments fields name: input_file_1
- created the Form Template which looks like:
<table border="0" cellspacing="5" cellpadding="5">
<tbody>
<tr>
<td><strong>input_file_1</strong></td>
<td>{input_file_1}</td>
</tr>
</tbody>
</table>


Now The Problem:
- After sending the Form I got a Warning message from Joomla :
Warning - Failed to change file permissions.
- But when I check the upload Folder the file is successfully uploaded.
- and the Email is sent but there is no attachment

Debug Data

- Upload routine started for file upload by : input_file_1
- /html/images/upload/Filename.docx could not be uploaded!!
- email
- 10
Result An email has been SENT successfully from (Sopimusuvuori)info@domain.com to myemail@domain.com
Body
input_file_1


Submitted by 2.20.22.23
Attachments array ( )

I would be glad if someone could help me with this

Tobi
GreyHead 17 Feb, 2015
1 Likes
Hi Tobi,

Please copy and paste the whole of the Debugger output here.

Bob
F. 17 Feb, 2015
Hey Bob,

Here is the debug content:
<fieldset>
			<legend>Debug Data</legend>
			<ol>
						<li>
			Upload routine started for file upload by : input_file_1			</li>
						<li>
			/html/images/upload/20150217155023_Structure.pdf could not be uploaded!!			</li>
						<li>
						<fieldset>
			<legend>email</legend>
			<ol>
						<li>
						<fieldset>
			<legend>10</legend>
			<ol>
						<li>
									<fieldset>
						<legend>Result</legend>
						An email has been SENT successfully from (Sopimusuvuori)info@domain to myemail@domain.com						</fieldset>
								</li>
						<li>
									<fieldset>
						<legend>Body</legend>
						
			  
				 
					<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
					<base href="domain">
					<title>Email</title>
				 
				 
				 <table cellspacing="5" cellpadding="5" border="0">
<tbody>
<tr>
<td><strong>input_file_1</strong></td>
<td></td>
</tr>
</tbody>
</table><br><br>

Submitted by 5.10.62.99
			  						</fieldset>
								</li>
						<li>
									<fieldset>
						<legend>Attachments</legend>
						array (
)						</fieldset>
								</li>
						</ol>
			</fieldset>
					</li>
						</ol>
			</fieldset>
					</li>
						<li>
						<fieldset>
			<legend>redirect_user</legend>
			<ol>
						<li>
			Error: No Redirect URL found			</li>
						</ol>
			</fieldset>
					</li>
						</ol>
			</fieldset>
GreyHead 17 Feb, 2015
1 Likes
Hi Tobi,

That does look like a permissions problem to me. Can you add a Custom code action with this code to see if the file is uploading to the server
<?php
echo'<div>$_FILES: '.print_r($_FILES, true).'</div>';
?>

Bob
F. 17 Feb, 2015
Hey Bob
Here is the result of the custom code:

$_FILES: Array ( [input_file_1] => Array ( [name] => Structure.pdf [type] => application/pdf [tmp_name] => /var/tmp/phpdcLh5M [error] => 0 [size] => 97788 ) )

Tobi
GreyHead 17 Feb, 2015
1 Likes
Hi Tobi,

So it's uploading to the server OK but ChronoForms is unable to move it over to the /html/images/upload folder.

I can only suggest that you re-check the path (and/or try the ChronoForms default path by leaving the box empty) and check the folder is writable by the Joomla! User.

Bob
F. 17 Feb, 2015
Hey Bob,

this is curious cause i just checked that /html/images/upload Folder and there is the File
20150217161342_Structure.pdf
So the file is moved correctly.
and that folder has 777 Rights
I still don't get, what the problem is and how I fix this

Tobi
GreyHead 20 Feb, 2015
1 Likes
Hi Tobi,

So the Warning is just that - everything is working OK apart from the Email attachment?

Is the Email action *after* the Upload Files action?

Bob
F. 23 Feb, 2015
Hey Bob,

yes The Email is after the upload files action

Tobi
GreyHead 23 Feb, 2015
Hi Tobi,

Sorry I can’t see what the problem is. 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
This topic is locked and no more replies can be posted.