# Php image upload

**URL:** <https://forum.kirupa.com/t/php-image-upload/218750>\
**Category:** Uncategorized\
**Created:** [March 10, 2007, 3:08pm UTC](https://forum.kirupa.com/t/php-image-upload/218750 "2007-03-10T15:08:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![freggel](https://avatars.discourse-cdn.com/v4/letter/f/82dd89/32.png) [@freggel](https://forum.kirupa.com/u/freggel)\
**Post date:** [March 10, 2007, 3:08pm UTC](https://forum.kirupa.com/t/php-image-upload/218750/1 "2007-03-10T15:08:14Z")

</div>

I have created an image upload form with the html \<input type=“file”…

But I want that the user only can select .jpg files on the client side, so that it’s impossible to upload wrong MIME-types, of course I have a check on the server side written in php but for large images its sometimes stupid to upload a .bmp and after five minutes or so to get an error that the file type is incorrect. So I want to prevent that, does anyone know such a solution for the client side? perhaps javascript? I have seen that its possible on a site but have lost the url ☹

thanks in advance
