it work fine but if the user select the video so how i can access it any suggestion how i can differentiate on the base of file type. if there is video it show the video and if user select the imaage it display the image please help
You can look at the media type. It will return image for images, and generic_file for everything else. That should be good enough for you to know that's a video in your example. The file extension would also give you a very strong indicator of the file type.
★ I jump on these forums in my free time to help and share some insights. Not looking to be hired, and not looking for work. http://freakdesign.com.au ★