Is there any component in Yii that can upload and let the user view uploaded file after upload:

I want single extension to handle following files:

jpg, png, gift, mp3, wav, docx, doc, pdf and wmv

I have tried using XUpload but it does not generate previews of the files for PDF, doc and video files after upload.

Any suggestions? I have already wasted hours in searching.

有帮助吗?

解决方案

I think it's going to be difficult finding a single thing that does all what you ask. You'll probably have to split the upload and the view functionality. After the upload finishes, determine the file type and then ajax-return some kind of preview-url to load.

You'll probably even end up with different viewers that you'll have to support (one for pdf, one for audio, etc). It's highly unlikely that there is a single previewer out there than can handle all formats you mentioned.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top