FileReference, is it possible to preview the file?

I’m making a pic uploader and was wondering if it was possible to get a preview of the pic before it has been uploaded?