Previewing Files Online(In The Browser)


Am doing an application that allows users to upload documents of image/pdf(jpeg,jpg,gif,pdf…) types.The documents are stored in a server directory and the respective path stored in the database.

I would like to create a link/button which when clicked,opens the file of the given path in a browser.This way,users can preview a file without necessarily downloading it.

kindly give me suggestions that will help me solve this problem.



I feel if you use this fancy box extension This will be done in a popup fancy box ! Yii fancybox

Please use fancybox type as image then give href as your image url.

Thanks & Regards,

S.A. Johnson