Hi ,
I’m posting here an image uploader that supports 3 types of upload forms :
- a standard upload form
- a jQuery uploadify form
- a jqUploader form
Switching between these 3 types of forms can be done from the configuration.
The script is based on the original script Latavish’s Multiple Image Upload w/ Thumbnail Generation.
I also used an asset helper written by Philip Sturgeon.
And 2 more jQuery libraries :
- jQuery lightBox written by Leandro Vieira Pinho
- GalleryView written by Jack Anderson
You can get the code from here:
http://alecsandru.ro/stuff/ci/image-upload_0.1.zip
In case you want to save the images information in the DB,
the following table has to be created.
CREATE TABLE IF NOT EXISTS `img_pictures` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`imagename` varchar(100) NOT NULL,
`thumbnail` varchar(100) DEFAULT NULL,
`folder` varchar(255) DEFAULT NULL,
`filesize` int(11) NOT NULL,
`width` int(11) NOT NULL,
`height` int(11) NOT NULL,
`thumb_width` int(11) DEFAULT NULL,
`thumb_height` int(11) DEFAULT NULL,
`timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
Cheers
