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

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

CC BY-SA 3.0
2016-06-02T14:04:08.283Z
Thanks Brad. Replacing the whole `craft/app` folder worked a treat. Must have been a bad auto update
Adam Hughes
CC BY-SA 3.0
2017-08-07T08:03:53.617Z
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?
Martijn La Feber
CC BY-SA 3.0
2017-08-07T15:43:04.760Z
@MartijnLaFeber See https://craftcms.stackexchange.com/questions/5415/all-images-uploading-except-jpg-files
Brad Bell
CC BY-SA 3.0
2017-08-08T07:15:58.463Z
Some things are changed in MAMP 4.2, so these instructions will not do anymore.
Martijn La Feber
CC BY-SA 3.0
2016-06-02T04:31:11.820Z
2016-06-02T04:31:11.820Z
Brad Bell
<p>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.</p>

<p>In the Javascript console I can see the error:</p>

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

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

<p>This issue does not happen with PNG's.</p>

<p>After further investigation I found the Preview for the uploadFile "thing". </p>

<p>This Preview had the content</p>

<pre><code>PHP Error [500]

include(/Users/you/Sites/your-domain/craft/app/vendor/lsolesen/pel/src/PelInvalidDataException.php):
failed to open stream: No such file or directory 
(/Users/you/Sites/your-domain/craft/app/vendor/composer/ClassLoader.php:412)
</code></pre>

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

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

<p>I'm wondering whether it could be a composer install issue</p>

<p>Anyone got any ideas?</p>

<assets><upload>
JPG upload not completing in Craft 2.6.2789
# JPG upload not completing in Craft 2.6.2789

(Asked by: username_0 on 2016-06-01)

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]

include(/Users/you/Sites/your-domain/craft/app/vendor/lsolesen/pel/src/PelInvalidDataException.php):
failed to open stream: No such file or directory 
(/Users/you/Sites/your-domain/craft/app/vendor/composer/ClassLoader.php:412)

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?

**Tags:** assets, upload


---

## 1 answers

### Answer by username_1 on 2016-06-02. Score: 2 | Accepted answer

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.

> **Comments:**
> **username_0**: Thanks Brad. Replacing the whole `craft/app` folder worked a treat. Must have been a bad auto update  
> **username_2**: 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?  
> **username_1**: @MartijnLaFeber See https://craftcms.stackexchange.com/questions/5415/all-images-uploading-except-jpg-files  
> **username_2**: Some things are changed in MAMP 4.2, so these instructions will not do anymore.  

---

