# File upload error handling

**URL:** <https://discourse.slimframework.com/t/file-upload-error-handling/631>\
**Category:** Questions\
**Created:** [August 18, 2016, 11:33am UTC](https://discourse.slimframework.com/t/file-upload-error-handling/631 "2016-08-18T11:33:29Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![JoeBengalen](https://avatars.discourse-cdn.com/v4/letter/j/b5e925/32.png) [@JoeBengalen](https://discourse.slimframework.com/u/JoeBengalen)\
**Post date:** [August 18, 2016, 11:46am UTC](https://discourse.slimframework.com/t/file-upload-error-handling/631/2 "2016-08-18T11:46:53Z")

</div>

Can you show the code referred to?

I do not think Apache throws an error. If the file is too large this message will be show in `$uploadedFile->getError()`

> <https://github.com/slimphp/Slim/blob/3.x/Slim/Http/UploadedFile.php#L273>

Just check if that is OK before doing anything with the file.

---

_[View the full topic](https://discourse.slimframework.com/t/file-upload-error-handling/631)._
