upload with preview is now working