Option to view preview

In the form, Is there any options to view the preview of the attached files?

You want like this, then you have to customize the code.

Could u pls brief on accomplishing this preview currently I am uploading the file in dms so once uploaded the url instead of file.