added thumbnailgeneration on client side with saving on server