When uploading a new asset the loading bar appears complete but does not actually upload the JPG. I've investigated the Craft logs and cannot find any errors regarding this.

In the Javascript console I can see the error:

http://your-domain.com/index.php/admin/actions/assets/uploadFile 500 (Internal Server Error)

I'm using MAMP but this also happens on our development servers running apache.

This issue does not happen with PNG's.

After further investigation I found the Preview for the uploadFile "thing".

This Preview had the content

PHP Error [500]

failed to open stream: No such file or directory 

I then looked in the lsolesen vendor folder (which happens to handle stuff for Jpg and Tiff files) and the PelInvalidDataException.php file is missing.

I've copied this file from the git repo into the vendor folder and this now works. However this feels sketchy as hell.

I'm wondering whether it could be a composer install issue

Anyone got any ideas?

1 Answer 1


My guess is you had an auto-update or a git deployment go bad and some files didn't get updated properly.

To be safe, I'd download a fresh copy of Craft from https://craftcms.com and replace your existing craft/app folder with the new one to make sure you've got all of the latest files.

  • Thanks Brad. Replacing the whole craft/app folder worked a treat. Must have been a bad auto update Jun 2, 2016 at 14:04
  • I replaced the App folder but it won't upload any JPG files. I have MAMP Pro 4.2 (PHP 7.0.20) installed. What can I do to fix this? Aug 7, 2017 at 8:03
  • @MartijnLaFeber See craftcms.stackexchange.com/questions/5415/…
    – Brad Bell
    Aug 7, 2017 at 15:43
  • Some things are changed in MAMP 4.2, so these instructions will not do anymore. Aug 8, 2017 at 7:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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