Displays preview of image or PDF before upload