file_Upload not uploading files. 
Posted: 29 January 2008 05:07 PM   [ Ignore ]
Member
RankRankRank
Total Posts:  63
Joined  2007-05-31

I’m having trouble getting the file_upload to actually upload files via free-form.

I have a template in which users can select what type of form they need to use, one a straight forward contact form, the other takes in more information and allow “Guests” to
upload a file if they need to.

Both forms record the posted data provided. With one exception, when a file is uploaded, it does not transfer to any directory.

I have the CP Home › Admin › System Preferences › Security and Session Preferences - Process form data in Secure Mode? - set to NO to allow Site Guests to upload files.

My form tag looks like:

{exp:freeform:form form_name="inquiry_submission" form_id="inquiry_form" return="" notify="email@address.com" file_upload ="Inquiries" template="contact_response" required="contact_name|contact_email"}

And my file input looks like:

<div class="contactfield"><label for="project_att">Attachment:</label><br />
<
input type="file" name="project_att" id="project_att" />
</
div>

I have created a new Upload location and it receives files when uploading via the Publish page.

Any clue what I could be missing?

Oh, and my directory permissions are set to “777”. I have only been testing while logged in. I have yet to try and test as a Guest.

Profile
 
 
Posted: 30 January 2008 07:11 AM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  701
Joined  2004-03-30

The name of your file input field is not correct. You should name the field file1. Name additional upload fields in number sequence like file2, file3, file4, etc.

mk

 Signature 

Mitchell Kimbrough

Profile
 
 
Posted: 30 January 2008 08:40 AM   [ Ignore ]   [ # 2 ]
Member
RankRankRank
Total Posts:  63
Joined  2007-05-31
Mitchell Kimbrough - 30 January 2008 07:11 AM

The name of your file input field is not correct. You should name the field file1. Name additional upload fields in number sequence like file2, file3, file4, etc.

mk

Thank you very much. I scoured the docs for a model to follow but couldn’t locate anything (was I just missing it?). I did see other examples using this but had no idea this was a requirement - thought that the name selected was simply a descriptor each user was choosing.

Upload working now. TY!

Profile