Added error handling, page reload after upload media, client side image resizing