Answers.Body: <p>The issue lies if you have a Preparse field in that field layout, see details here: <a href="https://github.com/aelvan/Preparse-Field-Craft/issues/23" rel="nofollow noreferrer">https://github.com/aelvan/Preparse-Field-Craft/issues/23</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-13T18:47:43.963Z
Answers.LastActivityDate: 2017-03-13T18:47:43.963Z
Answers.UserDisplayName: Tim Kelty
Body: <p>I have a front end form for entries. All other fields are working fine however my assets keep throwing errors. </p>
  
  <p>My assets location is set to 'Images/{slug}' in the CP. Server info tells my Imagemagick is installed, on both local and staging environments. </p>
  
  <p>However, when I submit an entry form with a file chosen for the assets field I get an error
  'The file XXX does not appear to be an image.'
  The odd thing is that the image does actually get uploaded and it's in the expected assets location, but the entry does not get created.</p>
  
  <p>I should add that I can view it within the file directory, but the asset is not indexed into the Assets CP view.</p>
  
  <p>Any ideas?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-03-13T14:47:24.350Z
Comments.Text: Check your logs / user permission to upload files. It will probably show you what's wrong in the logs
Comments.UserDisplayName: Justin Dekkers
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-03-13T14:59:46.380Z
Comments.Text: I can't tell from the logs anything more useful? Getting `The file “assets58c6b35977b6b4.70042279.jpg” does not appear to be an image. in /Users/Sean/Sites/website/craft/app/etc/image/Image.php:130`
  
  And
  
  `Tried to rotate or strip EXIF data from image and failed: Empty input file /Users/Sean/Sites/website/craft/storage/runtime/temp/assets58c6b35977b6b4.70042279.jpg @ error/jpeg.c/JPEGErrorHandler/331`
Comments.UserDisplayName: shorn
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-03-13T15:19:47.547Z
Comments.Text: The only thing I can think of is the image name having a `.` in it which might be seen as the file type being `.70042279` instead of `.jpg` maybe try uploading a different image?
Comments.UserDisplayName: Justin Dekkers
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-03-13T15:20:45.243Z
Comments.Text: That's not the filename of the image that I'm uploading. I was guessing it was a temp version?
Comments.UserDisplayName: shorn
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-03-13T15:22:37.533Z
Comments.Text: @shorn seeing the exact same behavior your are with a frontend asset field.
Comments.UserDisplayName: Tim Kelty
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-03-13T15:24:02.117Z
Comments.Text: @TimKelty - glad I'm not the only one! Can't quite work out what's happening and it's one of the last things on my list before going live! 
Comments.UserDisplayName: shorn
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-03-13T15:25:33.527Z
Comments.Text: I found a similar question as this one. Maybe try uploading a .PNG as that was the problem in this one:
  
  http://craftcms.stackexchange.com/questions/5415/all-images-uploading-except-jpg-files
  
  If that is the problem you can try a solution there.
Comments.UserDisplayName: Justin Dekkers
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-03-13T15:49:40.937Z
Comments.Text: Tested with PNG. Same issue.
Comments.UserDisplayName: shorn
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-03-13T15:49:58.013Z
Comments.Text: Just tested with devMode off and get this... `Internal Server Error
  
  CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'targetId' cannot be null`
Comments.UserDisplayName: shorn
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-03-13T15:56:11.600Z
Comments.Text: From reading other threads, it seems that error is thrown due to same filenames. I tried again with a new image and got the 'does not appear to be an image' error again.
Comments.UserDisplayName: shorn
Tags: <assets><frontend><upload>
Title: Front end assets uploading, does not appear to be a an image error
ThreadText: # Front end assets uploading, does not appear to be a an image error
  
  (Asked by: username_0 on 2017-03-13)
  
  I have a front end form for entries. All other fields are working fine however my assets keep throwing errors.
  
  My assets location is set to 'Images/{slug}' in the CP. Server info tells my Imagemagick is installed, on both local and staging environments.
  
  However, when I submit an entry form with a file chosen for the assets field I get an error
  'The file XXX does not appear to be an image.'
  The odd thing is that the image does actually get uploaded and it's in the expected assets location, but the entry does not get created.
  
  I should add that I can view it within the file directory, but the asset is not indexed into the Assets CP view.
  
  Any ideas?
  
  **Tags:** assets, frontend, upload
  
  > **Comments:**
  > **username_1**: Check your logs / user permission to upload files. It will probably show you what's wrong in the logs  
  > **username_0**: I can't tell from the logs anything more useful? Getting `The file “assets58c6b35977b6b4.70042279.jpg” does not appear to be an image. in /Users/Sean/Sites/website/craft/app/etc/image/Image.php:130`  And  `Tried to rotate or strip EXIF data from image and failed: Empty input file /Users/Sean/Sites/website/craft/storage/runtime/temp/assets58c6b35977b6b4.70042279.jpg @ error/jpeg.c/JPEGErrorHandler/331`  
  > **username_1**: The only thing I can think of is the image name having a `.` in it which might be seen as the file type being `.70042279` instead of `.jpg` maybe try uploading a different image?  
  > **username_0**: That's not the filename of the image that I'm uploading. I was guessing it was a temp version?  
  > **username_2**: @username_0 seeing the exact same behavior your are with a frontend asset field.  
  > **username_0**: @username_2 - glad I'm not the only one! Can't quite work out what's happening and it's one of the last things on my list before going live!   
  > **username_1**: I found a similar question as this one. Maybe try uploading a .PNG as that was the problem in this one:  http://craftcms.stackexchange.com/questions/5415/all-images-uploading-except-jpg-files  If that is the problem you can try a solution there.  
  > **username_0**: Tested with PNG. Same issue.  
  > **username_0**: Just tested with devMode off and get this... `Internal Server Error  CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'targetId' cannot be null`  
  > **username_0**: From reading other threads, it seems that error is thrown due to same filenames. I tried again with a new image and got the 'does not appear to be an image' error again.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2017-03-13. Score: 3 | Accepted answer
  
  The issue lies if you have a Preparse field in that field layout, see details here: <https://github.com/aelvan/Preparse-Field-Craft/issues/23>
  
  
  ---
  
  