how is upload image with progress bar and Image Preview before upload to database with use of jQuery and codeigniter.
3 Answers
Not sure if its possible to preview an image you select from your disk on a website BEFORE its uploaded to the server, but you could try using Uploadify. It uses jQuery/Flash and PHP to upload files and has a progress bar built in. If you want to store it in a database as a BLOB, you'll need to upload then file_get_contents of the uploaded image in uploadify.php and store the output in a db column. If you don't want to use Flash, this thread might be of interest to you. It has a progress percentage, but not as visual as Uploadify. The other option is installing a php extension like this.
I heartily recommend you using Plupload. It's flexible and easy to use. What I personally like most about Plupload is the multiple runtimes, which allow you upload using HTML5, HTML4, Flash, Silverlight and gears. Belive me, do not work with flash upload save you some time.
You also could use the plupload queue to display progress bar and etc. Sometimes it demands some customization, but it's worth a shot.

- 524,688
- 99
- 697
- 795

- 440
- 2
- 6
-
Plupload is awesome. I was going to recommend this too. You can customise it to display a progressbar and even display thumbs. I know because I have done this. :) – PaulM Aug 15 '11 at 18:15