Forums

Another File Upload Post

bobelly 08 Apr, 2009
Hi there,

I am having a file upload problem similar to the others posted int his forum. Rather than usurp someone elses post I thought I would start a new thread here.
I have created a form and am trying to get the file upload to work so that users can attach a resume for an online job app.
When I fill out the form and attach the file, it submits and sends the email, however the uploaded file is not int he email nor is it in the upload directory.
My form is setup as follows:

Under the general tab-->Form tag attachment I have enctype="multipart/form-data"
Form method is POST

In my form code, I have the following for my file upload field:

<div class="form_item">
<div class="form_element cf_fileupload">
<label class="cf_label" style="width: 250px;">Upload your resume :</label>
<input class="cf_fileinput required" size="20" id="file_23" name="resUploadResume" type="file" />
</div>


Under the file upload tab, File Uploads are enabled
Field names and allowable extensions I have tried all of the following and a few others that I have since forgotten:

file_1:jpg|doc|zip{20000-1}
file_2:jpg|doc|zip{20000-1}
file_1:jpg|doc|zip{222222-1}
file_2:doc|pdf|wpd{200000-1}


I have tried uploading a jpg, a pdf and a doc, depending on which extensions I have allowed

I am using the default path for the upload path which is writeable (all perms set to 755). I have also tried another path (images/stories which I am able to upload to using Joomla's media manager).
To verify, I checked permissions both in cpanel and in Help-->Directory permissions, both of which list all dirs as writeable.

Below is the debug report returned when I turn debugging on:


1. Form passed first SPAM check OK
2. Form passed the submissions limit (if enabled) OK
3. Form passed the Image verification (if enabled) OK
4. Form passed the server side validation (if enabled) OK
5. $_POST Array: Array ( [resFirstName] => jkkljk [resLastName] => jkl [resEmail] => [email]jkjlk@hot.com[/email] [resAddress] => jkljlk [resAddress2] => [resCity] => jkl [resProvince] => jkl [resCountry] => jkl [resPostCode] => T4B3K3 [resPhone1] => 554-059-3949 [resPhone2] => [resHeardOfUs] => E-Newsletter/Email [resPosition] => jkfljsflk [chrono_verification] => Qg2Kw [aba01cd0788ea5ca55ed503c4c172928] => 1 )
6. $_FILES Array: Array ( [resUploadResume] => Array ( [name] => DSC004.jpg [type] => image/jpeg [tmp_name] => /tmp/phpGsWpIO [error] => 0 [size] => 160343 ) )
7. Form passed the plugins step (if enabled) OK
8. An email has been SENT successfully from () to [email]myemail@mydomain.com[/email]
9. Debug End


(actual email address replaced with [email]myemail@mydomain.com[/email])

My file size limit in my global configuration is set to 10MB
Under the global config I have also:
set Enable Web Services to ON
set Restrict Uploads to NO
set Check MIME types to NO
I have changed these settings individually and in various combinations.

Nothing seems to work, the result is always the same. Any help would be appreciated.

Thanks
Max_admin 09 Apr, 2009
from the debug it looks like the file was uploaded ok, i think this is a permissions problem, but whats your Chronoforms version ?

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
GreyHead 09 Apr, 2009
Hi bobelly,

The only thing I can see in there may just be a typo but there's mismatch between the input id="file_23" name="resUploadResume" and the permissions box where you have file_1 and file_2. I forget exactly which have to matchup but the easy answer is to make sure that the input name and id are both the same and match the permissions box: id="resUploadResume" name="resUploadResume" & resUploadResume:jpg|doc|zip{20000-1}

Bob
bobelly 09 Apr, 2009
Bob that was exactly what the problem was. I matched up all three and it works now without issue. This might be a good item to add to the tutorial... It seems so obvious now but I am not sure I would have caught that myself without spending a few more long hours on it!

Thanks for the help!
This topic is locked and no more replies can be posted.