implement preview loading after upload