2

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?

  • Check your logs / user permission to upload files. It will probably show you what's wrong in the logs – Justin Dekkers Mar 13 '17 at 14:47
  • 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 – shorn Mar 13 '17 at 14:59
  • 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? – Justin Dekkers Mar 13 '17 at 15:19
  • That's not the filename of the image that I'm uploading. I was guessing it was a temp version? – shorn Mar 13 '17 at 15:20
  • @shorn seeing the exact same behavior your are with a frontend asset field. – Tim Kelty Mar 13 '17 at 15:22
3

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.