Answers.Body: <p>That's a bug. The Asset wasn't saved because it would not be validated due to conflicting filenames. Thankfully, it's <a href="https://github.com/craftcms/cms/commit/8ca98621a49f2650ee0f15ae9dc6a6fb1c9df145" rel="nofollow noreferrer">fixed now</a>.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-09T07:33:51.777Z
Answers.LastActivityDate: 2018-02-09T07:33:51.777Z
Answers.UserDisplayName: Andris Sevcenko
Body: <p>I have a front end save entry form which users can attach photos too, it all works fine unless a photo with the same filename is saved, in this instance the entry saves but the asset field is just left blank, can't find anything in the docs,</p>
  
  <p>Any help or a point in the right direction appreciated!</p>
  
  <pre><code>&lt;form id="addCompanyForm" method="post" enctype="multipart/form-data" accept-charset="UTF-8"&gt;
    {{ csrfInput() }}
    &lt;input type="hidden" name="sectionId" value="7"&gt;
    &lt;input type="hidden" name="enabled" value="0"&gt;
    &lt;input type="hidden" name="action" value="entries/save-entry"&gt;
  
    &lt;input id="title" type="text" name="title"&gt;
    &lt;input id="companyLogo" type="file" name="fields[companyLogo]" accept=".png, .jpg"&gt;
  
    &lt;/form&gt;
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-02-08T19:00:35.703Z
Comments.Text: Do you use a custom controller for it or the default craft way?
Comments.UserDisplayName: Robin Schambach
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-02-08T19:52:23.473Z
Comments.Text: @RobinSchambach default craft way, have updated original Q with the form code
Comments.UserDisplayName: craigh44
Tags: <assets><craft3><frontend-form>
Title: Craft 3 front end form file uploads not saving if filename exists?
ThreadText: # Craft 3 front end form file uploads not saving if filename exists?
  
  (Asked by: username_0 on 2018-02-08)
  
  I have a front end save entry form which users can attach photos too, it all works fine unless a photo with the same filename is saved, in this instance the entry saves but the asset field is just left blank, can't find anything in the docs,
  
  Any help or a point in the right direction appreciated!
  
  ```
  <form id="addCompanyForm" method="post" enctype="multipart/form-data" accept-charset="UTF-8">
    {{ csrfInput() }}
    <input type="hidden" name="sectionId" value="7">
    <input type="hidden" name="enabled" value="0">
    <input type="hidden" name="action" value="entries/save-entry">
  
    <input id="title" type="text" name="title">
    <input id="companyLogo" type="file" name="fields[companyLogo]" accept=".png, .jpg">
  
    </form>
  
  ```
  
  **Tags:** assets, craft3, frontend-form
  
  > **Comments:**
  > **username_1**: Do you use a custom controller for it or the default craft way?  
  > **username_0**: @username_1 default craft way, have updated original Q with the form code  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2018-02-09. Score: 1 | Accepted answer
  
  That's a bug. The Asset wasn't saved because it would not be validated due to conflicting filenames. Thankfully, it's [fixed now](https://github.com/craftcms/cms/commit/8ca98621a49f2650ee0f15ae9dc6a6fb1c9df145).
  
  
  ---
  
  