简体   繁体   中英

How to upload files using Ajax and Codeigniter without having Flash support?

I have tried to many javascript plugins but finally had to post this question. Which is the best way to upload files using PHP CodeIgniter framework & Ajax ?

I use Plupload for everything now. Because it is mostly client side driven it runs on any almost any webbrowser and platform(.net,php,etc)

It uses clever ways of detecting browser compatibility; It tries to inject Flash objects or silverlight into the client to allow for functionality such as chunked uploads allowing for uploads greater than 2gb, with speed(kb/s), queue management, etc.

This is truly an amazing uploader.. but it is so under exposed that it took me years to find this. And now my sites (with a bit of perfectionist work) look like Google or Facebook styled uploaders.. FOR FREE!

在此处输入图片说明

I've used http://valums.com/ajax-upload/ with great success in a web app. That was over a year ago, though. I used Kohana, not CI, but it's really agnostic on that matter.

ajax does not natively support file uploads. you can achieve this by submitting a form to an iframe and reading the response. there are many plugins available which serves the functionality in an organized way.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM