Smart Ajax Uploader
Smart Ajax Uploader package gives you server side and client side upload functions intract with database. Also it gives you image resize function for the purpose of generating icons from original image.
| * id | id of upload file tag ( ex: upload_insert_id ) |
| * url | url of server side upload file ( ex: upload.php ) |
| file_extension | Extension of allowed file ( ex: jpg,png,etc.. ) |
| file_size | Maximum file size in KB ( ex: 1024 KB ) |
| success | Success callback function ( ex: upload_success() ) |
| failure | Failure callback function ( ex: upload_failure() ) |
| width | Width of progress bar ( ex: 250 ) |
| height | Height of progress bar ( ex: 28 ) |
| * upload_path | path to upload file ( ex: upload/ ) |
| * table_name |
table name for insert upload image path ( ex: ajax_upload ) |
| * field_names |
table field names to store file information ( ex: path,size,type ) * path |
| file_extension | Extension of allowed file ( ex: jpg,png,etc.. ) |
| file_size | Maximum file size in KB ( ex: 1024 KB ) |
| extra_insertion |
extra information to insert while upload ( ex: array('caption'=>'image caption') caption must be table field name |
| condition | perfom update query with replacing of new file with older one ex: id='1' |
| if you don't pass condition in this function returns inserted id | |
| * table_name | mysql table name ( ex: ajax_upload ) or pass file path to delete file ( ex: upload/EkJHhctX8eUE24fONP_.jpg ) |
| condition | table condition to delete ( ex: id='1' ) |
| filed_name | file path stored field name ( ex: path ) |
| * source | source image path with filename( ex:upload/EkJHhctX8eUE24fONP_.jpg ) |
| max_width | maximum width of resized image ( ex:300 this may be empty ) |
| max_height | maximum height of resized image ( ex:300 this may be empty ) |
| exception | in exception you can pass value 1 to 4 , 1 -> if source image is less than max height and width then set max height as image height, 2 -> if source image is less than max height and width then set max width as image width, 3 -> if source image is less than max height and width then set image to fixed height and width, 4 -> always resize image to fixed height and width. |
| destination | if you mention destination path image resized and store it in destination path ( ex: upload/thumbnails/EkJHhctX8eUE24fONP_.jpg ) |