Documentation - aviable parameters
| Parameter | Possible values | Description |
|---|---|---|
| path | - | The path to the folder you would like to save the files to. End's with '/' |
| startOn | auto manually onSubmit:formId |
If set to auto, files will be uploaded on select. If set to manually, files will be uploaded after click on upload button. If set to onSubmit, files will be uploaded when the form with given id (after ':') will be submited. |
| ajax | true false |
Can be used only, if startOn is set to onSubmit:formId. When ajax is set to true, form data will be send via ajax to script specified in form action parameter, using method (post or get) specified in form method parameter. |
| ajaxInfoId | - | Can be used only, if ajax is set to true. Specified html node id where information outputted by script specified in form action parameter will be placed. So for example if you place in your php script (which submitted form) echo $message; the message will be placed in html node with ajaxInfoId id parameter. |
| ajaxLoaderId | - | Can be used only, if ajax is set to true. Specified html node id which contains loader graphic. This node will be show before sending ajax request and will be hidden after getting response. Sample loader node can look like this: <span class="imu_loader" id="loader"> <img src='ajax-loader.gif'/> </span> To make it work use ajaxLoaderId='loader' |
| buttonCaption | - | Upload button caption. Specify just if you use startOn="manually" |
| multi | true false |
true - multiple file uploads, false - one file upload |
| afterUpload | image link filename custom text |
Specified what's appears after upload. image - preview of uploaded file will be displayed, link - link to the uploaded file will be displayed, filename - the name of the uploaded file will be displayed, custom text - your custom text will be displayed (by example afterUploade="Upload complete!") If you specify custom text, you can use predefined variables to display some statistics:
|
| onprogress | percentage speed |
Specified type of information displayed when file is uploaded. percentage - displayed percentage part of uploaded file, speed - displayed avarage speed of upload in kB/s |
| thumbnails | - | Dimension or dimensions of thumbnails that will be generated (in pixels). By example if you want to generate a 90x90 thumbnail use thumbnails="90x90". If you want to generate 3 thumbnails (first - 90x90, second - width 100px, heigth - keep aspect ratio, third - height 200px, width - keep aspect ratio) use thumbnails="90x90,100x,x200". |
| thumbnailsFolders | - | Paths to folders, where generated thumbnails will be placed. If you not specify this attribute, thumbnails will be placed in upload directory (specified by path parameter). If you specified by example 2 paths and you will generate 3 thumbnails, the first 2 thumbnails will be placed in specified foledrs, third thumbnail will be placed in upload folder (specified by path parameter). Notice: Thumbnails will be created with predefinied names (you can change them in upload.php file). First thumbnail will get thumb0_filename name, second will get thumb1_filename etc. |
| fileExt | - | List of allowed file extensions, eg. fileExt="jpg,png,gif". Notice: If you're using this parameter, you should also specify fileDesc parameter. |
| fileDesc | - | The text that will appear at the bottom of the browse dialog box, eg. fileDesc="Images (jpg, png, gif)". |
| thumbnailsAfterUpload | image link filename custom text |
Specified what's appears after thumbnails generation. image - preview of thumbnail will be displayed, link - link to the thumbnail will be displayed, filename - the name of the thumbnail will be displayed, custom text - your custom text will be displayed. This parameter should be used like thumbnails parameter, by example (for 3 thumbnails) thumbnailsAfterUpload="link,image,Thumbnail created!". If you're not gonna specify this parameter, the thumbnails information/image will not be displayed. |
| maxSize | - | The maximum upload file size in bytes. |
| hideButton | true false |
Enable to hide the flash button so you can style the underlying div element from your custom css (by for example background: url('your_button.png') no-repeat; parameter). |
| button | - | Path to custom upload button. |
| bwidth | - | Custom upload button width in pixels. |
| bheight | - | Custom upload button height in pixels. |
| buttonText | - | Caption of browse files button. |
| queueId | - | The id of the custom upload queue. You can use your own upload queue, rather than default queue. Just create own queue and specify it's id. The files will be show in your custom queue. |
| data | - | Custom data, that will be send to upload.php script. Data can be in json format or can contain jQuery dom element selectors from which value will be taken. By example data="'variable1':'value1', 'variable2':'value2', 'formInput':'selector:[name=firstInput]', 'otherInput':'selector:#someId'". |
| method | post get |
Specified the method used to send data to upload script. |
| filesLimit | - | Number value of maximum files that can be selected to upload. |
| allowRemove | true false |
true - user can remove file after upload, false - user can't remove file after upload. Notice:If you set this parameter to true and using custom value of path parameter (different than "files/"), you've got to change default "files" folder value in upload.php file (lines 59, 60, 62) to your custom folder name/path. |
| removeData | - | Custom data, that will be send using POST method to upload.php script, when user click on remove button (available when parameter allowRemove is set to true). Data can be in json format or can contain jQuery dom element selectors from which value will be taken. For example: removeData="'variable1':'value1', 'variable2':'value2', 'formInput':'selector:[name=firstInput]', 'otherInput':'selector:#someId'". |
| sessionId | - | If you want to use session in upload.php scirpt, you've got to specify this parameter. By example sessionId="". (Check how_to_pass_session.html source.) |
| uploadScript | - | The path to upload script. By default is set to upload.php. |
| wmode | - | Set's flash wmode parameter. By default is set to transparent. |