<p>I just tested this locally and it's working fine (with the caveat that the latest build 2.1.2568 introduced a separate, unrelated bug that broke front-end asset uploading that's been fixed in <a href="http://buildwithcraft.com/updates#build2569" rel="nofollow">build 2.1.2569</a>).</p>

<p>Most likely something is failing validation when the entry is saving.</p>

<p>Try using this to see if there are any errors:</p>

<pre><code>&lt;form class="ajax-form" method="post" action="" enctype="multipart/form-data" accept-charset="UTF-8"&gt;

    {% macro errorList(errors) %}
        {% if errors %}
            &lt;ul class="errors"&gt;
                {% for error in errors %}
                    &lt;li&gt;{{ error }}&lt;/li&gt;
                {% endfor %}
            &lt;/ul&gt;
        {% endif %}
    {% endmacro %}

    {% from _self import errorList %}

    &lt;input type="hidden" name="action" value="guestEntries/saveEntry"&gt;
    &lt;input type="hidden" name="sectionId" value="17"&gt;
    &lt;input type="hidden" name="enabled" value="1"&gt;
    &lt;input type="hidden" name="fields[whitepaperCategory]" value="{{entry.title}}"&gt;

    &lt;label for="name"&gt;Name&lt;/label&gt;
    &lt;input type="text" id="name" name="title" required&gt;

    {% if entry is defined %}
        {{ errorList(entry.getErrors('title')) }}
    {% endif %}

    &lt;label for="email"&gt;Email Address&lt;/label&gt;
    &lt;input type="email" id="email" name="fields[email]" required&gt;

    {% if entry is defined %}
        {{ errorList(entry.getErrors('email')) }}
    {% endif %}

    &lt;label for="resume"&gt;Resume and Cover Letter (.pdf)&lt;/label&gt;
    &lt;div class="file-upload btn btn-primary"&gt;
        &lt;span&gt;Upload Resume and Cover Letter&lt;/span&gt;
        &lt;input type="file" id="resume" name="fields[resumes][]" class="upload" multiple&gt;
    &lt;/div&gt;

    {% if entry is defined %}
        {{ errorList(entry.getErrors('resumes')) }}
    {% endif %}

    &lt;button type="submit" class="btn btn-submit"&gt;Submit&lt;/button&gt;
&lt;/form&gt;
</code></pre>

CC BY-SA 3.0
2014-08-18T18:01:09.120Z
2014-08-19T17:27:46.587Z
2014-08-19T17:27:46.587Z
Brad Bell
<p>I'm using <a href="https://github.com/pixelandtonic/GuestEntries" rel="nofollow">Craft Guest Entries</a> plugin and the Entry Form technique elsewhere on my site. I'm currently trying to add a file upload to it. The entry is publishing but nothing is making it to assets.</p>

<p>Here's the code:</p>

<pre><code>&lt;form class="ajax-form" method="post" action="" enctype="multipart/form-data" accept-charset="UTF-8"&gt;
    &lt;input type="hidden" name="action" value="guestEntries/saveEntry"&gt;
    &lt;input type="hidden" name="sectionId" value="17"&gt;
    &lt;input type="hidden" name="enabled" value="1"&gt;
    &lt;input type="hidden" name="fields[whitepaperCategory]" value="{{entry.title}}"&gt;

    &lt;label for="name"&gt;Name&lt;/label&gt;
    &lt;input type="text" id="name" name="title" required&gt;

    &lt;label for="email"&gt;Email Address&lt;/label&gt;
    &lt;input type="email" id="email" name="fields[email]" required&gt;

    &lt;label for="resume"&gt;Resume and Cover Letter (.pdf)&lt;/label&gt;
    &lt;div class="file-upload btn btn-primary"&gt;
        &lt;span&gt;Upload Resume and Cover Letter&lt;/span&gt;
        &lt;input type="file" id="resume" name="fields[resumes][]" class="upload" multiple&gt;
    &lt;/div&gt;

    &lt;button type="submit" class="btn btn-submit"&gt;Submit&lt;/button&gt;
&lt;/form&gt;
</code></pre>

<p>Is there anything obvious I'm missing?</p>

CC BY-SA 3.0
2014-07-30T19:11:48.803Z
So, uhh, how does Ajax come in play here?
Andris Sevcenko
CC BY-SA 3.0
2014-07-30T19:31:17.890Z
Well I'm submitting the form using AJAX, which is working for all my forms that don't have file uploads. The form is submitting here as well, but the file input is not making it to Craft. I took AJAX out of the picture earlier and I'm having the same problem, so maybe it isn't AJAX's fault.
Allen Pieper
CC BY-SA 3.0
2014-07-30T19:57:23.367Z
Something might be failing validation. Make sure devMode is enabled, reproduce it and see if anything gets logged with [error] or [warning] in your craft/storage/runtime/logs files.
Brad Bell
CC BY-SA 3.0
2014-07-30T21:02:03.717Z
There are some errors but none that are timestamped near any of my form submissions. I submitted the form a few times and nothing new has shown up.
Allen Pieper
CC BY-SA 3.0
2014-08-12T20:19:11.670Z
I may have misunderstood something (particularly as Brad has already commented on this), but [in this answer](http://craftcms.stackexchange.com/a/362/505), Brad seems to be stating that the Guest Entries plugin cannot process file uploads.
Stephen Lewis
CC BY-SA 3.0
2014-08-18T17:44:54.320Z
@StephenLewis - That Brad guy has no idea what he's talking about.
Brad Bell
CC BY-SA 3.0
2014-08-18T17:47:08.250Z
@BradBell I'm confused, which of you is sober Brad?
Stephen Lewis
CC BY-SA 3.0
2014-08-18T18:02:11.097Z
@StephenLewis - There isn't a sober Brad.  Just added an answer.
Brad Bell
<form><plugin-guestentries>
Can guests upload files to assets in an entry form?
# Can guests upload files to assets in an entry form?

(Asked by: username_0 on 2014-07-30)

I'm using Craft Guest Entries plugin and the Entry Form technique elsewhere on my site. I'm currently trying to add a file upload to it. The entry is publishing but nothing is making it to assets.
Here's the code:

    
    
    
    

    Name
    

    Email Address
    

    Resume and Cover Letter (.pdf)
    
        Upload Resume and Cover Letter
        
    

    Submit


Is there anything obvious I'm missing?

**Tags:** form, plugin-guestentries
> **Comments:**
> **username_1**: So, uhh, how does Ajax come in play here?  
> **username_0**: Well I'm submitting the form using AJAX, which is working for all my forms that don't have file uploads. The form is submitting here as well, but the file input is not making it to Craft. I took AJAX out of the picture earlier and I'm having the same problem, so maybe it isn't AJAX's fault.  
> **username_2**: Something might be failing validation. Make sure devMode is enabled, reproduce it and see if anything gets logged with [error] or [warning] in your craft/storage/runtime/logs files.  
> **username_0**: There are some errors but none that are timestamped near any of my form submissions. I submitted the form a few times and nothing new has shown up.  
> **username_3**: I may have misunderstood something (particularly as Brad has already commented on this), but [in this answer](http://craftcms.stackexchange.com/a/362/505), Brad seems to be stating that the Guest Entries plugin cannot process file uploads.  
> **username_2**: @StephenLewis - That Brad guy has no idea what he's talking about.  
> **username_3**: @BradBell I'm confused, which of you is sober Brad?  
> **username_2**: @StephenLewis - There isn't a sober Brad.  Just added an answer.  

---

## 1 answers

### Answer by username_2 on 2014-08-18. Score: 4

I just tested this locally and it's working fine (with the caveat that the latest build 2.1.2568 introduced a separate, unrelated bug that broke front-end asset uploading that's been fixed in build 2.1.2569).
Most likely something is failing validation when the entry is saving.
Try using this to see if there are any errors:


    {% macro errorList(errors) %}
        {% if errors %}
            
                {% for error in errors %}
                    {{ error }}
                {% endfor %}
            
        {% endif %}
    {% endmacro %}

    {% from _self import errorList %}

    
    
    
    

    Name
    

    {% if entry is defined %}
        {{ errorList(entry.getErrors('title')) }}
    {% endif %}

    Email Address
    

    {% if entry is defined %}
        {{ errorList(entry.getErrors('email')) }}
    {% endif %}

    Resume and Cover Letter (.pdf)
    
        Upload Resume and Cover Letter
        
    

    {% if entry is defined %}
        {{ errorList(entry.getErrors('resumes')) }}
    {% endif %}

    Submit


---

