Setting up endpoint to show images and pdf