MultiPowUpload 3.1
Tutorials |
![]() ![]() |
MultiPowUpload tutorials
Data types
Here is the list of all data types used by MultiPowUpload:var params = { wmode: "transparent" }; var attributes = { id: "MultiPowUpload", name: "MultiPowUpload", style:"position:absolute" }; var flashvars = { "uploadUrl": "FileProcessingScripts/PHP/uploadfiles.php", "useExternalInterface": "true", "overlayObjectId":"browseButton", "hiddenMode": "true" }; swfobject.embedSWF("ElementITMultiPowUpload3.1.swf", "MultiPowUpload_holder", "90", "30", "10.0.0", "Extra/expressInstall.swf", flashvars, params, attributes);
Upload thumbnails
MultiPowUpload can generate image thumbails on the client side and upload them to a server. Supported image formats are JPEG, PNG, GIF. Here are the steps to configure the thumbnails upload feature:fit - MultiPowUpload will generate thumbnails with the size based on the aspect ratio of the original image. The result thumbnail dimensions may differ from the thumbnail.width and thumbnail.height parameters if the aspect rato of the original image and the destination thumbnail are different.
In our example this mode will produce an image with the 100x75 dimensions. The original image is resized by the longest side (in our case - by width).
=
fitByWidth - the result thumbnail will always have specified width. The result thumbnails height calculated with respect of the the aspect ratio of the original image.
In our example this mode will produce an image with the 100x75 dimensions.
=
fitByHeight - the result thumbnail will always have specified height. The result thumbnails width calculated with respect of the the aspect ratio of the original image.
In our example this mode will produce an image with the 133x100 dimensions.
=
exactFit - the result thumbnail will always have specified dimensions. If the aspect rato of the original image and the destination thumbnail are different, "unused" space of thumbnail is filled with thumbnail.backgroundColor color. If the value of the thumbnail.format parameter set to "PNG" and the value of the thumbnail.transparentBackground parameter set to true, result thumbnail will have transparent background.
In our example this mode will produce an image with the 100x100 dimensions. The original image is resized by the longest side (in our case - by width).
=
stretch - the result thumbnail will always have specified dimensions. If it is necessary, the image is stretched by width or height.
In our example this mode will produce an image with the 100x100 dimensions. As you can see, the image is stretched by the smallest side (in our case - by height).
=
crop - the result thumbnail will always have specified dimensions. If it is necessary, the image is cropped by width or height.
In our example this mode will produce an image with the 100x100 dimensions. The result image is cropped by the longest side (in our case - by width).
=
Uploade modes, chunked upload mode.
By default, MultiPowUpload uploads files by the classic (RFC 1867) method. Here are several disadvantages of this method:Classic method | Chunked method | |
File size limit. | 2 Gb | Adobe Flash guarantees 100 MB files uploading by this method but even 500 MB files work correctly on most PCs. |
Cookies are sent correctly. | No | Yes |
Server should be configured for large file uploads. | Yes | No |
Server side file processing script. | Standard | Custom script from the distribution package |
Skinning UI
MultiPowUpload provides the possibility to set colors, text styles, icons for most of UI elements and even replace them with the custom image files. To combine all of those parameters in one place, you can use the MultiPowUpload theme package.Form fields for each file. Configuring description window.
MultiPowUpload allows to have the feature to set up form fields for each file. It may be helpful if you would like to have a description for each file or some other information."descriptionWindow.inputs.album.type":"dropdown",This form field will be posted to server with the "album" name, so on server side you can access its value like this: Request.Form["album"] (ASP.NET) or $_POST["album"] (PHP).
"descriptionWindow.inputs.album.index":"2",
"descriptionWindow.inputs.album.specificForTypes":"",
"descriptionWindow.inputs.album.dropDownOptions":"Family;Friens;Other",
"descriptionWindow.inputs.album.label":"Album",
"descriptionWindow.inputs.album.message":"Select album for image"
Control MultiPowUpload using server response.
Starting from version 3.1, MultiPowUpload supports the execution of some commands received from a server in an http response.<MultiPowUpload> //display message with caption "Warning" message from tagHere is the decription of all available tags (commands):
<message>Uploaded</message>
//set value of parameter
<param name="clearButtonVisible">false</param>
//display message with specified caption and message
<function name="showAlert" param1="warning" param2="error message"/>
//cancell upload
<callfunction name="cancelUpload"/>
</MultiPowUpload>
Internationalization of UI.
Starting from version 3.1, MultiPowUpload provides the feature to detect a user's language automatically and load an necessary file with the translation. This feature can be enabled/disabled using the language.autoDetect parameter (false by deafult). If the parameter is set to true, MultiPowUpload will try to detect the user's language using the following JavaScript statement:(navigator.language) ? navigator.language : navigator.userLanguage
. When the language is detected, the 2-letter language code will replace <LANGUAGE_CODE> placeholder in the language.source parameter. If the value of language.source parameter
does not contain
<LANGUAGE_CODE> placeholder, the language detection will not be performed. If the value of the language.autoDetect parameter is set to false and
the value of the language.source parameter
contains <LANGUAGE_CODE> placeholder, the language detection will not be performed and the language.source parameter will be ignored.
Auto layout. Relative coordinates.
To fit UI elements sizes to a dinamic text, MultiPowUpload have the autoLayout parameter which is enabled by default. When the value of this parameter is set to true, MultiPowUpload will automatically adjust the width and the height of the buttons depending on the text size and reposition all UI elements if their coordinates has been set as relative.
You can set the position of almost all UI elements, but dimensions of UI elements sometimes change at runtime (loading different translation files) and they overlap other UI elements. To avoid this issue, MultiPowUpload (starting from 3.1 version) allows to set the position of the UI elements relatively to the position of another UI element.
You can use ariphmetic operations and special placeholders inside the values of the parameters that set coordinates of some UI element.
Here is syntax of placeholder:
<ui_Element_Name.property> - where ui_Element_Name is a name of a UI element, for example, clearButton, and property is one of the Rectangled properties.
ui_Element_Name can have one of the values listed below:
The property can have one of the following values: